mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-10 08:41:32 -07:00
fix(vc-gutter): type error in indirect buffers
Due to `buffer-file-name` being nil. Fix: #8629
This commit is contained in:
parent
3e15fb36d7
commit
2afab01530
1 changed files with 12 additions and 12 deletions
|
|
@ -118,18 +118,18 @@ Respects `diff-hl-disable-on-remote'."
|
|||
(add-hook! '(doom-escape-hook doom-switch-window-hook doom-switch-frame-hook) :append
|
||||
(defun +vc-gutter-update-h (&rest _)
|
||||
"Return nil to prevent shadowing other `doom-escape-hook' hooks."
|
||||
(and (or (bound-and-true-p diff-hl-mode)
|
||||
(bound-and-true-p diff-hl-dir-mode))
|
||||
(buffer-file-name (buffer-base-buffer))
|
||||
(not ; debouncing
|
||||
(equal (cons (point) +vc-gutter--last-state)
|
||||
(setq +vc-gutter--last-state
|
||||
(cons (point)
|
||||
(copy-sequence
|
||||
(symbol-plist
|
||||
(intern (expand-file-name buffer-file-name)
|
||||
vc-file-prop-obarray)))))))
|
||||
(ignore (diff-hl-update)))))
|
||||
(when-let* (((or (bound-and-true-p diff-hl-mode)
|
||||
(bound-and-true-p diff-hl-dir-mode)))
|
||||
(file (buffer-file-name (buffer-base-buffer)))
|
||||
((not ; debouncing
|
||||
(equal (cons (point) +vc-gutter--last-state)
|
||||
(setq +vc-gutter--last-state
|
||||
(cons (point)
|
||||
(copy-sequence
|
||||
(symbol-plist
|
||||
(intern (expand-file-name file)
|
||||
vc-file-prop-obarray)))))))))
|
||||
(ignore (diff-hl-update)))))
|
||||
;; UX: Update diff-hl when magit alters git state.
|
||||
(when (modulep! :tools magit)
|
||||
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue