Skip to content

Commit 10df332

Browse files
committed
Only redraw with cursor moves for keyloop
Close #210
1 parent 31b3aca commit 10df332

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

autoload/ctrlp.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ fu! s:ForceUpdate()
625625
endf
626626

627627
fu! s:BuildPrompt(upd)
628+
if a:upd == 0 && line('$') <= winheight(0) | | redr | retu | en
628629
let base = ( s:regexp ? 'r' : '>' ).( s:byfname() ? 'd' : '>' ).'> '
629630
let str = escape(s:getinput(), '\')
630631
let lazy = str == '' || exists('s:force') || !has('autocmd') ? 0 : s:lazy
@@ -806,7 +807,7 @@ fu! s:PrtSelectMove(dir)
806807
let dirs = {'t': 'gg','b': 'G','j': 'j','k': 'k','u': wht.'k','d': wht.'j'}
807808
exe 'keepj norm!' dirs[a:dir]
808809
if s:nolim != 1 | let s:cline = line('.') | en
809-
if line('$') > winheight(0) | cal s:BuildPrompt(0) | en
810+
cal s:BuildPrompt(0)
810811
endf
811812

812813
fu! s:PrtSelectJump(char)
@@ -830,7 +831,7 @@ fu! s:PrtSelectJump(char)
830831
en
831832
exe 'keepj norm!' ( jmpln + 1 ).'G'
832833
if s:nolim != 1 | let s:cline = line('.') | en
833-
if line('$') > winheight(0) | cal s:BuildPrompt(0) | en
834+
cal s:BuildPrompt(0)
834835
en
835836
endf
836837
" Misc {{{2

0 commit comments

Comments
 (0)