[vim/vim] fix hlset() failure with attribute values containing spaces (PR #19843)

1 view
Skip to first unread message

mattn

unread,
5:21 AM (13 hours ago) 5:21 AM
to vim/vim, Subscribed

hlset(hlget('Normal')) fails with E416 when a highlight attribute value contains spaces (e.g. font name "Monospace 10"). hlg_add_or_update() builds a string like "font=Monospace 10" and passes it to do_highlight(), whose parser splits on whitespace and treats "10" as a separate key without "=".

Fix by quoting values with single quotes (e.g. font='Monospace 10') when the value contains spaces and the attribute is a key=value pair. do_highlight() already supports single-quoted values.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19843

Commit Summary

  • 25a56d2 fix hlset() failure with attribute values containing spaces

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19843@github.com>

Reply all
Reply to author
Forward
0 new messages