aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHasu2022-08-02 18:19:38 +0900
committerHasu2022-08-02 18:19:38 +0900
commitfa915cf1792620957ff099c3e79a81c652a6545f (patch)
tree866403136a37785e114667622520d8e3ccc6e364
parent3ce448c9687ae96dea0caf4da388ecd8d9072f72 (diff)
downloadctrlp.vim-fa915cf1792620957ff099c3e79a81c652a6545f.tar.gz

feat: support cmdheight=0

-rw-r--r--autoload/ctrlp.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index d4445c8..ac4dc65 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -330,6 +330,7 @@ fu! s:Open()
endf
fu! s:Close()
+ if &cmdheight != 0 | set cmdheight=0 |en
cal s:async_glob_abort(0)
cal s:buffunc(0)
if winnr('$') == 1
@@ -1269,6 +1270,7 @@ fu! ctrlp#acceptfile(...)
cal call('s:openfile', args)
let &swb = swb
en
+ if &cmdheight != 0 | set cmdheight=0 |en
endf
fu! s:SpecInputs(str)
@@ -2845,6 +2847,8 @@ fu! ctrlp#init(type, ...)
if shouldExitSingle && s:ExitIfSingleCandidate()
retu 0
en
+
+ if &cmdheight == 0 | set cmdheight=1 | en
cal s:BuildPrompt(1)
if s:keyloop | cal s:KeyLoop() | en
retu 1