Closed ryanartecona closed 2 years ago
This is probably related to https://github.com/syohex/emacs-git-gutter/issues/86
The return values of fringe-helper-insert-region
have properties insert-in-front-hooks
and modification-hooks
.
See https://github.com/nschum/fringe-helper.el/blob/master/fringe-helper.el#L175.
And the function fringe-helper-modification-func
is added to those hooks. It creates new overlays which do not have the git-gutter
property when text is modified or inserted.
So I guess setting insert-in-front-hooks
and modification-hooks
to nil
for the return values of fringe-helper-insert-region
fixes this issue. But I do not quite understand why just calling fringe-helper-remove
does not work (I read the comment).
I'm closing this issue since it's been over 5 years since #28 was merged. Please reopen if there is still an issue here. Thanks!
version: GNU Emacs 24.4.1 (x86_64-apple-darwin14.1.0, Carbon Version 157 AppKit 1344.72)
Occasionally I will get
git-gutter-fringe
overlays stuck in my fringe which I can't clear by toggling the fringe, toggling linum, or even callinggit-gutter:clear
orgit-gutter-fr:clear
.I don't know exactly what triggers this. I think it may only happen when there's only 1 hunk left to show in the gutter (e.g. after making a few edits to a file, and then undoing them one by one), but then again that may be only because I only notice after undoing all my temporary edits to a file.
I did some poking, and it looks like the
'git-gutter
property on the overlays gets removed without the overlays themselves getting removed. That is,(overlay-get ov 'git-gutter)
returnsnil
on an overlay that I can clearly see is still showing a git-gutter-fringe overlay in it.This could be a
git-gutter
problem instead of something specific togit-gutter-fringe
, but I only usegit-gutter-fringe
so I couldn't tell.