Merge pull request #949 from chrisbra/cmd_highlighter
cmd.exe: Check for NONE/fg/bg of color value
This commit is contained in:
commit
1490f59e75
|
@ -9,6 +9,8 @@ let s:accents = {}
|
|||
function! s:gui2cui(rgb, fallback)
|
||||
if a:rgb == ''
|
||||
return a:fallback
|
||||
elseif match(a:rgb, 'NONE\|[fb]g')
|
||||
return a:rgb
|
||||
endif
|
||||
let rgb = map(matchlist(a:rgb, '#\(..\)\(..\)\(..\)')[1:3], '0 + ("0x".v:val)')
|
||||
let rgb = [rgb[0] > 127 ? 4 : 0, rgb[1] > 127 ? 2 : 0, rgb[2] > 127 ? 1 : 0]
|
||||
|
|
Loading…
Reference in New Issue