Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclearable overlays #23

Closed
ryanartecona opened this issue Apr 9, 2015 · 4 comments
Closed

Unclearable overlays #23

ryanartecona opened this issue Apr 9, 2015 · 4 comments

Comments

@ryanartecona
Copy link

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 calling git-gutter:clear or git-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) returns nil 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 to git-gutter-fringe, but I only use git-gutter-fringe so I couldn't tell.

@ereslibre
Copy link

This is probably related to emacsorphanage/git-gutter#86

@stakemori
Copy link
Contributor

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).

@syohex
Copy link
Contributor

syohex commented Sep 29, 2016

#28 was merged. Please check latest version.

@gonewest818
Copy link
Collaborator

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants