Skip to content
Snippets Groups Projects
Commit f766531e authored by Junegunn Choi's avatar Junegunn Choi
Browse files

[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.
parent 7f59b42b
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment