GitGutterLineHighlightsToggle doesn't update immediately on neovim
Closed this issue · 3 comments
Hi, I've noticed that on neovim built from the master branch :GitGutterLineHighlightsToggle
doesn't take effect immediately, something needs to force gitgutter to update, for example calling :GitGutter
(which I use as a workaround).
What is the latest commit SHA in your installed vim-gitgutter?
What vim/nvim version are you on?
nvim d3e51603bc94fac68cd2c92ae7ebc90baa8471fe but the behavior started around a84b454ebe661981f292ee8fc73be4f9cd3a5884
Is this toggling from off to on or on to off or both?
Here's the implementation:
vim-gitgutter/autoload/gitgutter/highlight.vim
Lines 1 to 31 in 67ef116
It depends on whether g:gitgutter_signs
(whether to show signs) is on or off.
Both. Judging by the code, I guess sign define
changes are not applied to already placed signs, until they are removed and placed again, so it's a neovim bug.
That sounds plausible to me.
I expect that writing a separate code path using extmarks would resolve this, but I don't really have time to do that at the moment.
Defining your own command which calls :GitGutterLineHighlightsToggle
and then :GitGutter
, i.e. your workaround, seems like the best way past this for now.