Remove redundant ":p" modification during detection

Every ":p" does I/O to check for a directory, so let's do away with the
belt-and-suspenders usage.
This commit is contained in:
Tim Pope
2021-12-23 14:57:01 -05:00
parent 3fb9beacbc
commit f18571e647

View File

@@ -621,8 +621,8 @@ augroup fugitive
autocmd!
autocmd BufNewFile,BufReadPost *
\ call FugitiveDetect(expand('<amatch>:p'), 0)
autocmd FileType netrw call FugitiveDetect(fnamemodify(get(b:, 'netrw_curdir', expand('<afile>:p')), ':p'), 1)
\ call FugitiveDetect(+expand('<abuf>'), 0)
autocmd FileType netrw call FugitiveDetect(get(b:, 'netrw_curdir', +expand('<abuf>')), 1)
autocmd FileType git
\ call fugitive#MapCfile()