Fix set_color to use gui_running or termguicolors (#140)

Close #139
This commit is contained in:
J
2017-03-09 14:25:13 +08:00
committed by Junegunn Choi
parent ebdd67fd61
commit 14696abd45

View File

@@ -33,7 +33,7 @@ function! s:get_color(group, attr)
endfunction
function! s:set_color(group, attr, color)
let gui = a:color =~ '^#'
let gui = has('gui_running') || has('termguicolors') && &termguicolors
execute printf('hi %s %s%s=%s', a:group, gui ? 'gui' : 'cterm', a:attr, a:color)
endfunction