aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2015-07-14 00:36:21 +0200
committerMarco Hinz <mh.codebro@gmail.com>2015-07-18 16:55:25 +0200
commit84ce97714b4f614da0851b74e9774d5b50e881a2 (patch)
tree28818dc8e3ffb3824859b5d6eab6be708689d69c
parent7732bec9b8b94cb43647dcb7f5bd2619224bd87a (diff)
downloadrneovim-84ce97714b4f614da0851b74e9774d5b50e881a2.tar.gz
rneovim-84ce97714b4f614da0851b74e9774d5b50e881a2.tar.bz2
rneovim-84ce97714b4f614da0851b74e9774d5b50e881a2.zip
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.
-rw-r--r--src/nvim/eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 21f21a4c80..9957643c8d 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -14699,6 +14699,8 @@ static void f_synIDattr(typval_T *argvars, typval_T *rettv)
modec = TOLOWER_ASC(mode[0]);
if (modec != 'c' && modec != 'g')
modec = 0; /* replace invalid with current */
+ } else if (ui_rgb_attached()) {
+ modec = 'g';
} else {
modec = 'c';
}