Created
October 31, 2015 04:53
-
-
Save dahu/fdac39059e6058cd6239 to your computer and use it in GitHub Desktop.
jellybeans respect cterm overrides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/colors/jellybeans.vim b/colors/jellybeans.vim | |
index f9d5397..a1535ec 100644 | |
--- a/colors/jellybeans.vim | |
+++ b/colors/jellybeans.vim | |
@@ -275,9 +275,15 @@ fun! s:X(group, fg, bg, attr, lcfg, lcbg) | |
else | |
let l:fge = empty(a:fg) | |
let l:bge = empty(a:bg) | |
+ let l:lcfge = empty(a:lcfg) | |
+ let l:lcbge = empty(a:lcbg) | |
if !l:fge && !l:bge | |
- exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".s:rgb(a:bg) | |
+ if !l:lcfge && !l:lcbge | |
+ exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".a:lcfg." ctermbg=".a:lcbg | |
+ else | |
+ exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".s:rgb(a:bg) | |
+ endif | |
elseif !l:fge && l:bge | |
exec "hi ".a:group." guifg=#".a:fg." guibg=NONE ctermfg=".s:rgb(a:fg)." ctermbg=NONE" | |
elseif l:fge && !l:bge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment