fix(vc-gutter): remove advice removal for diff-hl-overlay-modified
Originally, this intended to *stop* diff-hl from too aggressively deleting the diff overlays while editing. This is either no longer the case or the old advice was mistaken; the intended behavior is achieved without it.
This commit is contained in:
parent
d55d7f3088
commit
99b0b70c49
1 changed files with 6 additions and 8 deletions
|
@ -203,14 +203,12 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
(apply fn args)))
|
||||
|
||||
;; UX: Don't delete the current hunk's indicators while we're editing
|
||||
(when (featurep! :editor evil)
|
||||
(add-hook! 'diff-hl-flydiff-mode-hook
|
||||
(defun +vc-gutter-init-flydiff-mode-h ()
|
||||
(if diff-hl-flydiff-mode
|
||||
(progn
|
||||
(advice-remove #'diff-hl-overlay-modified #'ignore)
|
||||
(when (featurep! :editor evil)
|
||||
(add-hook 'evil-insert-state-exit-hook #'diff-hl-flydiff-update)))
|
||||
(remove-hook 'evil-insert-state-exit-hook #'diff-hl-flydiff-update))))
|
||||
(if (not diff-hl-flydiff-mode)
|
||||
(remove-hook 'evil-insert-state-exit-hook #'diff-hl-flydiff-update)
|
||||
(add-hook 'evil-insert-state-exit-hook #'diff-hl-flydiff-update)))))
|
||||
|
||||
;; FIX: Reverting a hunk causes the cursor to be moved to an unexpected place,
|
||||
;; often far from the target hunk.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue