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

visual-fill-column-mode prevents gutter to show up #193

Open
farynaio opened this issue Mar 16, 2021 · 1 comment
Open

visual-fill-column-mode prevents gutter to show up #193

farynaio opened this issue Mar 16, 2021 · 1 comment

Comments

@farynaio
Copy link

farynaio commented Mar 16, 2021

I found git-gutter don't work with visual-fill-column-mode.

Is there any way to work around this?

@farynaio farynaio changed the title global-auto-revert-mode prevents gutter to show up visual-fill-column-mode prevents gutter to show up Mar 16, 2021
@Boruch-Baum
Copy link

Boruch-Baum commented Dec 31, 2023

I have a work-around, but what it does is disable 'visual-line-mode' while 'git-gutter-mode' is active, so it isn't a perfect solution. If @farynaio and @purcell approve, I'll prepare it as a PR, but the code looks like this:

(make-variable-buffer-local 'git-gutter:visual-line)
(defun git-gutter-visual-line ()
  "Hook function for interoperability.
Package 'git-gutter' doesn't play with 'visual-line-mode', so we
disable that mode while 'git-gutter' is active."
  (cond
   (git-gutter-mode
     (setq git-gutter:visual-line visual-line-mode)
     (visual-line-mode -1))
   (t
     (visual-line-mode git-gutter:visual-line))))

(add-to-list 'git-gutter-mode-on-hook 'git-gutter-visual-line)
(add-to-list 'git-gutter-mode-off-hook 'git-gutter-visual-line)

My opinion is that this bug is pretty important because my first attempts to use this package were in org-mode with visual-line-mode enabled and if it weren't a slow off-day, I wouldn't have bothered with the frustration , and would have just rejected the package.

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

2 participants