diff options
author | Christian Brabandt <cb@256bit.org> | 2024-02-05 10:30:01 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-02-05 10:34:26 +0100 |
commit | 0f4054feb66ea55414f97add63b3070d7d7b5295 (patch) | |
tree | 4b632c5a1ef083d216d8fe3daf35f201748bb1f2 /runtime/doc/eval.txt | |
parent | de7f5bde6c598d4da4ce5b30328eb458962ba60a (diff) |
runtime(colors): color names in the v:colornames dict should be lower cased
Vim will lookup color names from the v:colornames dictionary by its
lower case color name. So when sourcing the v:colornames dictionary,
make sure to convert upper case color names to lower case.
Also, while at it, mention in the documentation, that the dictionary
should contain lower case names only.
fixes: #13976
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 9c12fb8504..574b9c9dd9 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.1. Last change: 2024 Jan 14 +*eval.txt* For Vim version 9.1. Last change: 2024 Feb 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2005,9 +2005,14 @@ v:collate The current locale setting for collation order of the runtime *v:colornames* v:colornames A dictionary that maps color names to hex color strings. These color names can be used with the |highlight-guifg|, - |highlight-guibg|, and |highlight-guisp| parameters. Updating - an entry in v:colornames has no immediate effect on the syntax - highlighting. The highlight commands (probably in a + |highlight-guibg|, and |highlight-guisp| parameters. + + The key values in the dictionary (the color names) should be + lower cased, because Vim looks up a color by its lower case + name. + + Updating an entry in v:colornames has no immediate effect on + the syntax highlighting. The highlight commands (probably in a colorscheme script) need to be re-evaluated in order to use the updated color values. For example: > |