mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-04-08 02:01:50 +00:00
[vim] Use 24-bit colors if termguicolors is set
This commit is contained in:
parent
ff248d566d
commit
cbb5134874
@ -167,9 +167,12 @@ function! s:common_sink(action, lines) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:get_color(attr, ...)
|
function! s:get_color(attr, ...)
|
||||||
|
let gui = has('termguicolors') && &termguicolors
|
||||||
|
let fam = gui ? 'gui' : 'cterm'
|
||||||
|
let pat = gui ? '^#[a-f0-9]\+' : '^[0-9]\+$'
|
||||||
for group in a:000
|
for group in a:000
|
||||||
let code = synIDattr(synIDtrans(hlID(group)), a:attr, 'cterm')
|
let code = synIDattr(synIDtrans(hlID(group)), a:attr, fam)
|
||||||
if code =~ '^[0-9]\+$'
|
if code =~? pat
|
||||||
return code
|
return code
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user