mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 03:53:47 -05:00
Improve GitGutter User autocommand: context/unsilent
This provides `g:gitgutter_hook_context` during the hook's execution and removes the `:silent`, but uses `exists()` instead. The bufnr might be necessary to know in the User autocommand, e.g. to clear some cache. Not using`:silent` is good practice in general to not hide (wanted) output and errors etc.
This commit is contained in:
committed by
Andy Stewart
parent
4692457ae2
commit
a046b5ace1
@@ -159,6 +159,8 @@ event GitGutter. You can listen for this event, for example:
|
||||
>
|
||||
autocmd User GitGutter call updateMyStatusLine()
|
||||
<
|
||||
A dictionary `g:gitgutter_hook_context` is made available during its execution,
|
||||
which contains an entry `bufnr` that contains the buffer number being updated.
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user