diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 7f426bf..1c14312 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -161,7 +161,7 @@ endfunction augroup fugitive autocmd! autocmd BufNewFile,BufReadPost * call s:Detect(expand(':p')) - autocmd FileType netrw call s:Detect(expand(':p')) + autocmd FileType netrw call s:Detect(expand('%:p')) autocmd User NERDTreeInit,NERDTreeNewRoot call s:Detect(b:NERDTreeRoot.path.str()) autocmd VimEnter * if expand('')==''|call s:Detect(getcwd())|endif autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('')), 'fugitive_leave')