merge: pull request #6369 from elken/feature/editor-format-refactor
This commit is contained in:
commit
a234d8e9c0
89 changed files with 526 additions and 728 deletions
|
@ -116,6 +116,11 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
;; UX: update git-gutter on focus (in case I was using git externally)
|
||||
(add-hook 'focus-in-hook #'git-gutter:update-all-windows)
|
||||
|
||||
;; Stop git-gutter doing things when we don't want
|
||||
(remove-hook 'post-command-hook #'git-gutter:post-command-hook)
|
||||
(advice-remove #'quit-window #'git-gutter:quit-window)
|
||||
(advice-remove #'switch-to-buffer #'git-gutter:switch-to-buffer)
|
||||
|
||||
(add-hook! '(doom-escape-hook doom-switch-window-hook) :append
|
||||
(defun +vc-gutter-update-h (&rest _)
|
||||
"Refresh git-gutter on ESC. Return nil to prevent shadowing other
|
||||
|
@ -130,6 +135,9 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
(advice-add #'magit-stage-file :after #'+vc-gutter-update-h)
|
||||
(advice-add #'magit-unstage-file :after #'+vc-gutter-update-h)
|
||||
|
||||
;; UX: update git-gutter after reverting a buffer
|
||||
(add-hook 'after-revert-hook #'+vc-gutter-update-h)
|
||||
|
||||
;; FIX: stop git-gutter:{next,previous}-hunk from jumping to random hunks.
|
||||
(defadvice! +vc-gutter--fix-linearity-of-hunks-a (diffinfos is-reverse)
|
||||
:override #'git-gutter:search-near-diff-index
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue