mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 22:33:51 -05:00
Make FugitiveChanged event aware of :Git result
If g:fugitive_result is defined during the User FugitiveChanged event, one can trigger a custom behavior based on the arguments in .args or the output in .file. References https://github.com/tpope/vim-fugitive/pull/1015
This commit is contained in:
@@ -22,6 +22,8 @@ function! FugitiveGitDir(...) abort
|
||||
return getbufvar(a:1, 'git_dir')
|
||||
elseif type(a:1) == type('')
|
||||
return substitute(s:Slash(a:1), '/$', '', '')
|
||||
elseif type(a:1) == type({})
|
||||
return get(a:1, 'git_dir', '')
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user