diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index fb4dcaf..57a8deb 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -158,7 +158,7 @@ augroup fugitive autocmd BufNewFile,BufReadPost * call s:Detect(expand(':p')) autocmd FileType netrw call s:Detect(expand(':p')) autocmd VimEnter * if expand('')==''|call s:Detect(getcwd())|endif - autocmd BufWinLeave * execute getwinvar(+winnr(), 'fugitive_leave') + autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('')), 'fugitive_leave') augroup END " }}}1