commit fecd42864a4bb592d96af9f038475eea2163df58 (tree)
parent 01e7a7e1e68b7cb2593ac529a6af2c35802c28b0
Author: Tim Pope <code@tpope.net>
Date: Thu, 31 May 2018 18:43:09 -0400
Handle unusually named netrw buffers
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -276,7 +276,7 @@ endfunction
augroup fugitive
autocmd!
autocmd BufNewFile,BufReadPost * call FugitiveDetect(expand('%:p'))
- autocmd FileType netrw call FugitiveDetect(expand('%:p'))
+ autocmd FileType netrw call FugitiveDetect(fnamemodify(get(b:, 'netrw_curdir', @%), ':p'))
autocmd User NERDTreeInit,NERDTreeNewRoot call FugitiveDetect(b:NERDTree.root.path.str())
autocmd VimEnter * if expand('<amatch>')==''|call FugitiveDetect(getcwd())|endif
autocmd CmdWinEnter * call FugitiveDetect(expand('#:p'))