emacsorphanage / git-gutter-fringe

Fringe version of git-gutter.el
162 stars 17 forks source link

fringe never clears #10

Closed njsmith closed 10 years ago

njsmith commented 10 years ago

Hello,

I have a problem similar to #3, except that I'm getting it with the current version and it seems to be perfectly consistent... I've installed via el-get-install git-gutter-fringe, and then in .emacs I have:

(require 'git-gutter-fringe)
(global-git-gutter-mode 1)
(setq git-gutter:lighter "")

And I find that the fringe appears when I edit lines, but once a mark appears in the fringe, it never goes away. I can commit (via calling git on the command-line, or via magit), I can re-save after committing, etc., but any lines that were previously modified will continue to be marked as modified, even if they have been committed. The only way to clear the fringe is to close the buffer entirely and then re-open it.

This is with emacs 24.3.1 from debian testing.

syohex commented 10 years ago

Sorry I can't reproduce. Could you tell me how to reproduce this issue in more detail ?

mbme commented 10 years ago

I also have this issue. Emacs version is 24.3.1 on Archlinux. My config contains

(require 'git-gutter-fringe)
(global-git-gutter-mode)
(set-face-foreground 'git-gutter-fr:modified "yellow")
(set-face-foreground 'git-gutter-fr:added    "green")
(set-face-foreground 'git-gutter-fr:deleted  "orange")
(add-hook 'git-gutter:update-hooks 'magit-revert-buffer-hook)
(add-to-list 'git-gutter:update-hooks 'focus-in-hook)
(add-to-list 'git-gutter:update-commands 'other-window)

I use latest versions of git-gutter and git-gutter-fringe. Everything works correctly while I use only git-gutter. (When I execute git-gutter:clear manually it also do nothing)

mbme commented 10 years ago

Ok, seems that the issue happens because of missing git-gutter module. I've resolved the issue by adding (require 'git-gutter) before (require 'git-gutter-fringe), so probably this issue can be closed :)

syohex commented 10 years ago

You should not load git-gutter because it is loaded when git-gutter-fringe is loaded.

https://github.com/syohex/emacs-git-gutter-fringe/blob/master/git-gutter-fringe.el#L43

mbme commented 10 years ago

I've removed (require 'git-gutter) and everything still works correctly. That's strange.

syohex commented 10 years ago

Please reopen if you still have this issue.