Skip to content

Commit fc153aa

Browse files
authored
Merge pull request #586 from ctrlpvim/hi-update
Update highlight after ColorScheme event
2 parents 5d798ad + a49bd69 commit fc153aa

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

autoload/ctrlp.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,6 +2714,15 @@ fu! ctrlp#nosy()
27142714
retu !( has('syntax') && exists('g:syntax_on') )
27152715
endf
27162716

2717+
fu! s:hiupdate()
2718+
for [ke, va] in items(s:hlgrps)
2719+
let ke = 'CtrlP' . ke
2720+
if hlexists(ke)
2721+
exe 'hi link' ke va
2722+
en
2723+
endfo
2724+
endf
2725+
27172726
fu! ctrlp#hicheck(grp, defgrp)
27182727
if !hlexists(a:grp)
27192728
exe 'hi link' a:grp a:defgrp
@@ -2847,6 +2856,7 @@ if has('autocmd')
28472856
au BufEnter ControlP cal s:checkbuf()
28482857
au BufLeave ControlP noa cal s:Close()
28492858
au VimLeavePre * cal s:leavepre()
2859+
au ColorScheme * cal s:hiupdate()
28502860
aug END
28512861
en
28522862

0 commit comments

Comments
 (0)