Skip to content

Commit 7517706

Browse files
committed
Close window fast
1 parent d5b0920 commit 7517706

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

autoload/ctrlp.vim

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ fu! s:Open()
330330
endf
331331

332332
fu! s:Close()
333-
cal s:async_glob_abort()
333+
cal s:async_glob_abort(0)
334334
cal s:buffunc(0)
335335
if winnr('$') == 1
336336
bw!
@@ -488,10 +488,12 @@ fu! s:async_glob_on_exit(...)
488488
en
489489
endf
490490

491-
fu! s:async_glob_abort()
491+
fu! s:async_glob_abort(upd)
492492
cal s:stop_job_if_exists()
493493
cal s:stop_timer_if_exists()
494-
cal s:ForceUpdate()
494+
if a:upd
495+
cal s:ForceUpdate()
496+
en
495497
endf
496498

497499
fu! s:stop_timer_if_exists()
@@ -1152,7 +1154,7 @@ fu! s:ToggleByFname()
11521154
endf
11531155

11541156
fu! s:ToggleType(dir)
1155-
cal s:async_glob_abort()
1157+
cal s:async_glob_abort(1)
11561158
let max = len(g:ctrlp_ext_vars) + len(s:coretypes) - 1
11571159
let next = s:walker(max, s:itemtype, a:dir)
11581160
cal ctrlp#setlines(next)

0 commit comments

Comments
 (0)