diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-14 02:12:52 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-05-14 02:14:21 +0900 |
| commit | f766531e7464f7c5174c881eb51e41524c972eef (patch) | |
| tree | 1e4826df9b6c650266347bd5e58b16ebaea18a7e /plugin/fzf.vim | |
| parent | 7f59b42b051bc6d1d9ff9170d90a2a7983b05118 (diff) | |
| download | fzf-f766531e7464f7c5174c881eb51e41524c972eef.tar.gz | |
[neovim] Make sure that fzf buffer is closed (#225)
- bd! leaves the window open when there's no other listed buffer
- redraw! seems to help avoid Neovim issues.
Diffstat (limited to 'plugin/fzf.vim')
| -rw-r--r-- | plugin/fzf.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 3f218b8e..b6df6146 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -283,12 +283,17 @@ function! s:execute_term(dict, command, temps) let fzf = { 'buf': bufnr('%'), 'dict': a:dict, 'temps': a:temps } function! fzf.on_exit(id, code) let tab = tabpagenr() + let wnr = winnr() execute 'bd!' self.buf + if winnr() == wnr + close + endif if s:ptab == tab wincmd p endif call s:pushd(self.dict) try + redraw! call s:callback(self.dict, self.temps) finally call s:popd(self.dict) |
