Skip to content
Myr

[vim] Use close+bufhidden=wipe instead of bd

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 2b7c3df · Browse files · 1 file+8 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−4 removed

  • other:+8 added−4 removed

1 file+8 added−4 removed

modified:plugin/fzf.vim+8 added-4 removed
270 unmodified lines
271 else272 tabnew273 endif274 finally275 setlocal winfixwidth winfixheight275 setlocal winfixwidth winfixheight buftype=nofile bufhidden=wipe nobuflisted276 endtry277endfunction278279function! s:execute_term(dict, command, temps)
2 unmodified lines
282283 let fzf = { 'buf': bufnr('%'), 'dict': a:dict, 'temps': a:temps }284 function! fzf.on_exit(id, code)285 let tab = tabpagenr()286 let wnr = winnr()287 execute 'bd!' self.buf288 if winnr() == wnr && tabpagenr() == tab286 if bufnr('') == self.buf287 " We use close instead of bd! since Vim does not close the split when288 " there's no other listed buffer289 close290 " FIXME This should be unnecessary due to `bufhidden=wipe` but in some291 " cases Neovim fails to clean up the buffer and `bufexists('[FZF]')292 " returns 1 even when it cannot be seen anywhere else. e.g. `FZF!`293 silent! execute 'bd!' self.buf294 endif295 if s:ptab == tab296 wincmd p297 endif
82 unmodified lines