Closed vitaly-zdanevich closed 1 year ago
Are you saying that after GitGutterUndoHunk:
~
sign is still there and has moved two lines down;~
disappear (but doesn't change the buffer)?Are you saying that after GitGutterUndoHunk:
Yes.
but doesn't change the buffer?
No changes to the buffer, but I want to remove ~
after GitGutterUndoHunk
:(
This is something on my side?
I suspect you have a default updatetime
, or it has a value of a few thousand (milliseconds) or more.
GitGutterUndoHunk
updates the buffer's contents as appropriate but doesn't do anything with the signs. The signs are refreshed when gitgutter's CursorHold
autocommand next fires.
My updatetime
is 100 which is why I never noticed this before.
It makes sense for updating the signs to be part of the hunk commands so I'll update the code to do that.
The code was already updating the signs are staging a hunk; it looks like I simply forgot to do that after undoing a hunk.
Thanks for letting me know about this.
Thanks, this problem is solved!
But another one:
GitGutterUndoHunk
:w
~
added :(, again only after mouse to another window and back.I can't reproduce that.
What does :verbose set updatetime
produce?
4000
Oh, yes, ~
is added back after 4 seconds...
So the ~
will vanish after 4 seconds.
I recommend setting updatetime
to something much lower, e.g. 100
.
Please see the first paragraph of Getting started in the readme :)
Oh, I see, 4000 is the default number in Vim...
GitGutter doesn't pay any attention to if / when you save a file. It's triggered by CursorHold(I) (and when you change to a different buffer or focus the window etc).
Before:
After:
~
disappear after I move my mouse to another display and return back.00df1089b6267f47c7c0f13536789feb9db1e65b