Fix git-gutter:disabled-modes check #1482
Also ignores git-gutter-fringe config if package was disabled.
This commit is contained in:
parent
6f3c1c6d00
commit
0f58634df4
1 changed files with 8 additions and 6 deletions
|
@ -27,15 +27,17 @@ to the right fringe.")
|
|||
|
||||
If the buffer doesn't represent an existing file, `git-gutter-mode's activation
|
||||
is deferred until the file is saved."
|
||||
(when (and (or +vc-gutter-in-remote-files
|
||||
(when (or +vc-gutter-in-remote-files
|
||||
(not (file-remote-p (or buffer-file-name default-directory))))
|
||||
(not (memq major-mode (bound-and-true-p git-gutter:disabled-modes))))
|
||||
(if (not buffer-file-name)
|
||||
(add-hook 'after-save-hook #'+vc-gutter|init-maybe nil t)
|
||||
(when (vc-backend buffer-file-name)
|
||||
(if (display-graphic-p)
|
||||
(when (and (vc-backend buffer-file-name)
|
||||
(progn
|
||||
(require 'git-gutter)
|
||||
(not (memq major-mode git-gutter:disabled-modes))))
|
||||
(if (and (display-graphic-p)
|
||||
(require 'git-gutter-fringe nil t))
|
||||
(progn
|
||||
(require 'git-gutter-fringe)
|
||||
(setq-local git-gutter:init-function #'git-gutter-fr:init)
|
||||
(setq-local git-gutter:view-diff-function #'git-gutter-fr:view-diff-infos)
|
||||
(setq-local git-gutter:clear-function #'git-gutter-fr:clear)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue