mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user