diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 4af2620..074e049 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -198,6 +198,7 @@ augroup fugitive autocmd FileType netrw call fugitive#detect(expand('%:p')) autocmd User NERDTreeInit,NERDTreeNewRoot call fugitive#detect(b:NERDTreeRoot.path.str()) autocmd VimEnter * if expand('')==''|call fugitive#detect(getcwd())|endif + autocmd CmdWinEnter * call fugitive#detect(expand('#:p')) autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('')), 'fugitive_leave') augroup END