mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 12:53:52 -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!
|
||||||
|
|
||||||
autocmd BufNewFile,BufReadPost *
|
autocmd BufNewFile,BufReadPost *
|
||||||
\ call FugitiveDetect(expand('<amatch>:p'), 0)
|
\ call FugitiveDetect(+expand('<abuf>'), 0)
|
||||||
autocmd FileType netrw call FugitiveDetect(fnamemodify(get(b:, 'netrw_curdir', expand('<afile>:p')), ':p'), 1)
|
autocmd FileType netrw call FugitiveDetect(get(b:, 'netrw_curdir', +expand('<abuf>')), 1)
|
||||||
|
|
||||||
autocmd FileType git
|
autocmd FileType git
|
||||||
\ call fugitive#MapCfile()
|
\ call fugitive#MapCfile()
|
||||||
|
|||||||
Reference in New Issue
Block a user