Relocate 'path' adjustment

I'm not sure where we should do this (if at all), but after loading the
appropriate buffer (and thus applying the file type) is a better place
than during general activation.
This commit is contained in:
Tim Pope
2019-09-03 23:45:54 -04:00
parent 2eb6aac0c4
commit 99ad1a89fa
2 changed files with 4 additions and 4 deletions

View File

@@ -341,7 +341,10 @@ augroup fugitive
\ silent doautocmd BufNewFile |
\ endif
autocmd BufReadCmd fugitive://*//* exe fugitive#BufReadCmd()
autocmd BufReadCmd fugitive://*//* exe fugitive#BufReadCmd() |
\ if &path =~# '^\.\%(,\|$\)' |
\ let &l:path = substitute(&path, '^\.,\=', '', '') |
\ endif
autocmd BufWriteCmd fugitive://*//[0-3]/* exe fugitive#BufWriteCmd()
autocmd FileReadCmd fugitive://*//* exe fugitive#FileReadCmd()
autocmd FileWriteCmd fugitive://*//[0-3]/* exe fugitive#FileWriteCmd()