Skip to content
Myr

[vim] Use 24-bit colors if termguicolors is set

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent ff248d5 · Browse files · 1 file+5 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−2 removed

  • other:+5 added−2 removed

1 file+5 added−2 removed

modified:plugin/fzf.vim+5 added-2 removed
165 unmodified lines
166 endtry167endfunction168169function! s:get_color(attr, ...)170 let gui = has('termguicolors') && &termguicolors171 let fam = gui ? 'gui' : 'cterm'172 let pat = gui ? '^#[a-f0-9]\+' : '^[0-9]\+$'173 for group in a:000171 let code = synIDattr(synIDtrans(hlID(group)), a:attr, 'cterm')172 if code =~ '^[0-9]\+$'174 let code = synIDattr(synIDtrans(hlID(group)), a:attr, fam)175 if code =~? pat176 return code177 endif178 endfor179 return ''
484 unmodified lines