diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 196d886..0d35728 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -107,7 +107,7 @@ endfunction augroup fugitive autocmd! autocmd BufNewFile,BufReadPost * call s:Detect() - autocmd BufUnload * execute getbufvar(+expand(''), 'fugitive_restore') + autocmd BufWinLeave * execute getbufvar(+expand(''), 'fugitive_restore') augroup END " }}}1