diff options
| author | Yasuhiro Matsumoto | 2022-03-17 02:21:51 +0900 |
|---|---|---|
| committer | Yasuhiro Matsumoto | 2022-03-17 02:21:51 +0900 |
| commit | 7517706537c2b93cd359e71db8c92dc1ebb0a916 (patch) | |
| tree | a2265e8a48db7cf12a4a3280f738ecb0324f4150 | |
| parent | d5b092036bc651912474f64277913be8502f8f09 (diff) | |
| download | ctrlp.vim-7517706537c2b93cd359e71db8c92dc1ebb0a916.tar.gz | |
Close window fast
| -rw-r--r-- | autoload/ctrlp.vim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 1b6b8c5..06eb9ff 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -330,7 +330,7 @@ fu! s:Open() endf fu! s:Close() - cal s:async_glob_abort() + cal s:async_glob_abort(0) cal s:buffunc(0) if winnr('$') == 1 bw! @@ -488,10 +488,12 @@ fu! s:async_glob_on_exit(...) en endf -fu! s:async_glob_abort() +fu! s:async_glob_abort(upd) cal s:stop_job_if_exists() cal s:stop_timer_if_exists() - cal s:ForceUpdate() + if a:upd + cal s:ForceUpdate() + en endf fu! s:stop_timer_if_exists() @@ -1152,7 +1154,7 @@ fu! s:ToggleByFname() endf fu! s:ToggleType(dir) - cal s:async_glob_abort() + cal s:async_glob_abort(1) let max = len(g:ctrlp_ext_vars) + len(s:coretypes) - 1 let next = s:walker(max, s:itemtype, a:dir) cal ctrlp#setlines(next) |