mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
synIDattr(): true color awareness
In Vim, which doesn't true colors, synIDattr('Foo', 'fg') returns either ctermfg or guifg depending on whether vim or gvim is running. True colors naturally use GUI colors, so synIDattr() has to be adapted to return guifg, if a TUI with enabled true colors is used.
This commit is contained in:
@@ -14699,6 +14699,8 @@ static void f_synIDattr(typval_T *argvars, typval_T *rettv)
|
|||||||
modec = TOLOWER_ASC(mode[0]);
|
modec = TOLOWER_ASC(mode[0]);
|
||||||
if (modec != 'c' && modec != 'g')
|
if (modec != 'c' && modec != 'g')
|
||||||
modec = 0; /* replace invalid with current */
|
modec = 0; /* replace invalid with current */
|
||||||
|
} else if (ui_rgb_attached()) {
|
||||||
|
modec = 'g';
|
||||||
} else {
|
} else {
|
||||||
modec = 'c';
|
modec = 'c';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user