mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 21:03:53 -05:00
Trigger FugitiveChanged after writing stage buffer
I deliberately omitted this event when adding FugitiveChanged, because I figured it made sense for consumers to instead tap into BufWritePost to see which file changed exactly. This would enable, say, vim-gitgutter, to only refresh signs for the file that actually changed, rather than for every file in the repository. In practice, however, vim-gitgutter doesn't even bother with "in the repository", let alone the exact file, opting instead to refresh every loaded buffer. I give up. Resolves: https://github.com/tpope/vim-fugitive/issues/1819
This commit is contained in:
@@ -2752,6 +2752,7 @@ function! fugitive#FileWriteCmd(...) abort
|
||||
if exists('#' . autype . 'WritePost')
|
||||
execute s:DoAutocmd(autype . 'WritePost ' . s:fnameescape(amatch))
|
||||
endif
|
||||
exe s:DoAutocmdChanged(dir)
|
||||
return ''
|
||||
else
|
||||
return 'echoerr '.string('fugitive: '.error)
|
||||
|
||||
Reference in New Issue
Block a user