aboutsummaryrefslogtreecommitdiff
path: root/colors/base16-rebecca.vim
diff options
context:
space:
mode:
authorFausto Núñez Alberro <fausto.nunez@mailbox.org>2021-01-24 13:32:06 +0100
committerFausto Núñez Alberro <fausto.nunez@mailbox.org>2021-01-24 13:32:06 +0100
commit18cb5d1988b52475a9557c53c9530389e99ad2d4 (patch)
treed8276334657165f461f565d46555b1f1702f0d9e /colors/base16-rebecca.vim
parent906d313c59b43987e4a10685b5f644b77b549d7d (diff)
Build the project with the changes from PR #7
https://github.com/fnune/base16-vim/pull/7
Diffstat (limited to 'colors/base16-rebecca.vim')
-rw-r--r--colors/base16-rebecca.vim21
1 files changed, 18 insertions, 3 deletions
diff --git a/colors/base16-rebecca.vim b/colors/base16-rebecca.vim
index 1fc178d..32b5b7a 100644
--- a/colors/base16-rebecca.vim
+++ b/colors/base16-rebecca.vim
@@ -153,11 +153,22 @@ function! g:Base16hi(group, guifg, guibg, ctermfg, ctermbg, ...)
let l:attr = get(a:, 1, "")
let l:guisp = get(a:, 2, "")
+ " See :help highlight-guifg
+ let l:gui_special_names = ["NONE", "bg", "background", "fg", "foreground"]
+
if a:guifg != ""
- exec "hi " . a:group . " guifg=#" . a:guifg
+ if index(l:gui_special_names, a:guifg) >= 0
+ exec "hi " . a:group . " guifg=" . a:guifg
+ else
+ exec "hi " . a:group . " guifg=#" . a:guifg
+ endif
endif
if a:guibg != ""
- exec "hi " . a:group . " guibg=#" . a:guibg
+ if index(l:gui_special_names, a:guibg) >= 0
+ exec "hi " . a:group . " guibg=" . a:guibg
+ else
+ exec "hi " . a:group . " guibg=#" . a:guibg
+ endif
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . a:ctermfg
@@ -169,7 +180,11 @@ function! g:Base16hi(group, guifg, guibg, ctermfg, ctermbg, ...)
exec "hi " . a:group . " gui=" . l:attr . " cterm=" . l:attr
endif
if l:guisp != ""
- exec "hi " . a:group . " guisp=#" . l:guisp
+ if index(l:gui_special_names, l:guisp) >= 0
+ exec "hi " . a:group . " guisp=" . l:guisp
+ else
+ exec "hi " . a:group . " guisp=#" . l:guisp
+ endif
endif
endfunction