Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions autoload/fuf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,11 @@ let s:FUF_BUF_NAME = '[fuf]'

"
function s:activateFufBuffer()
" Save the last window number so we can switch back to it later (otherwise,
" at least with more recent versions of Vim, we end up with the top left
" window focused)
let s:fuf_buffer_last_winnr = winnr()

" lcd . : To avoid the strange behavior that unnamed buffer changes its cwd
" if 'autochdir' was set on.
lcd .
Expand Down Expand Up @@ -733,6 +738,7 @@ function s:deactivateFufBuffer()
AutoComplPopUnlock
endif
call l9#tempbuffer#close(s:FUF_BUF_NAME)
exec s:fuf_buffer_last_winnr . "wincmd w"
endfunction

" }}}1
Expand Down