aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authormattn2021-12-12 03:09:32 +0900
committerGitHub2021-12-12 03:09:32 +0900
commitfc153aabd54f9189e576c9bfb07bac09f36f2ccd (patch)
tree61441e43a221667d1dd511cc98bd08bd36b0e74a
parent5d798ad8ef9844e86dec7bb75c579674bf35cbd9 (diff)
parenta49bd6902f6120653a042880372696757d6dbcfb (diff)
downloadctrlp.vim-fc153aabd54f9189e576c9bfb07bac09f36f2ccd.tar.gz

Merge pull request #586 from ctrlpvim/hi-update

Update highlight after ColorScheme event

-rw-r--r--autoload/ctrlp.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index 3d57546..5969793 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -2714,6 +2714,15 @@ fu! ctrlp#nosy()
retu !( has('syntax') && exists('g:syntax_on') )
endf
+fu! s:hiupdate()
+ for [ke, va] in items(s:hlgrps)
+ let ke = 'CtrlP' . ke
+ if hlexists(ke)
+ exe 'hi link' ke va
+ en
+ endfo
+endf
+
fu! ctrlp#hicheck(grp, defgrp)
if !hlexists(a:grp)
exe 'hi link' a:grp a:defgrp
@@ -2847,6 +2856,7 @@ if has('autocmd')
au BufEnter ControlP cal s:checkbuf()
au BufLeave ControlP noa cal s:Close()
au VimLeavePre * cal s:leavepre()
+ au ColorScheme * cal s:hiupdate()
aug END
en