mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 04:53:45 -05:00
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:
@@ -5847,9 +5847,6 @@ function! fugitive#Init() abort
|
|||||||
call s:Map('c', '<C-R><C-G>', '<SID>fnameescape(fugitive#Object(@%))', '<expr>')
|
call s:Map('c', '<C-R><C-G>', '<SID>fnameescape(fugitive#Object(@%))', '<expr>')
|
||||||
call s:Map('n', 'y<C-G>', ':<C-U>call setreg(v:register, fugitive#Object(@%))<CR>', '<silent>')
|
call s:Map('n', 'y<C-G>', ':<C-U>call setreg(v:register, fugitive#Object(@%))<CR>', '<silent>')
|
||||||
endif
|
endif
|
||||||
if expand('%:p') =~# ':[\/][\/]'
|
|
||||||
let &l:path = s:sub(&path, '^\.%(,|$)', '')
|
|
||||||
endif
|
|
||||||
let dir = s:Dir()
|
let dir = s:Dir()
|
||||||
if stridx(&tags, escape(dir, ', ')) == -1 && &tags !~# '\.git' && !exists('s:tags_warning')
|
if stridx(&tags, escape(dir, ', ')) == -1 && &tags !~# '\.git' && !exists('s:tags_warning')
|
||||||
let actualdir = fugitive#Find('.git/', dir)
|
let actualdir = fugitive#Find('.git/', dir)
|
||||||
|
|||||||
@@ -341,7 +341,10 @@ augroup fugitive
|
|||||||
\ silent doautocmd BufNewFile |
|
\ silent doautocmd BufNewFile |
|
||||||
\ endif
|
\ 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 BufWriteCmd fugitive://*//[0-3]/* exe fugitive#BufWriteCmd()
|
||||||
autocmd FileReadCmd fugitive://*//* exe fugitive#FileReadCmd()
|
autocmd FileReadCmd fugitive://*//* exe fugitive#FileReadCmd()
|
||||||
autocmd FileWriteCmd fugitive://*//[0-3]/* exe fugitive#FileWriteCmd()
|
autocmd FileWriteCmd fugitive://*//[0-3]/* exe fugitive#FileWriteCmd()
|
||||||
|
|||||||
Reference in New Issue
Block a user