aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorYasuhiro Matsumoto2022-08-03 09:44:09 +0900
committerYasuhiro Matsumoto2022-08-03 09:44:09 +0900
commit8b4a9523632049b3b373de1233bef346073b8982 (patch)
tree6e66c94d9bd9aa4d14cb51b984649a59bba7f848
parent00cd144122d82b339470f2406811aa6fdb09722d (diff)
downloadctrlp.vim-8b4a9523632049b3b373de1233bef346073b8982.tar.gz

save/restore cmdheight

-rw-r--r--autoload/ctrlp.vim10
1 files changed, 8 insertions, 2 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index b31c199..600ffa2 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -330,7 +330,10 @@ fu! s:Open()
endf
fu! s:Close()
- if has('patch-9.0.0115') && &cmdheight != 0 | set cmdheight=0 | en
+ if has('patch-9.0.0115') && exists('s:cmdheight')
+ let &cmdheight = s:cmdheight
+ unlet s:cmdheight
+ en
cal s:async_glob_abort(0)
cal s:buffunc(0)
if winnr('$') == 1
@@ -2847,7 +2850,10 @@ fu! ctrlp#init(type, ...)
retu 0
en
- if has('patch-9.0.0115') && &cmdheight == 0 | set cmdheight=1 | en
+ if has('patch-9.0.0115') && &cmdheight == 0
+ let s:cmdheight = &cmdheight
+ set cmdheight=1
+ en
cal s:BuildPrompt(1)
if s:keyloop | cal s:KeyLoop() | en
retu 1