fix(vc-gutter): apply +pretty to diff-hl-dired-mode

Amend: cd9bc5a1fd
This commit is contained in:
Henrik Lissner 2022-08-09 14:58:12 +02:00
parent e30eb03f83
commit e76f327e0a
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -33,9 +33,6 @@
nil nil 'bottom))
(defadvice! +vc-gutter-define-thin-bitmaps-a (&rest args)
:override #'diff-hl-define-bitmaps
(set-face-background 'diff-hl-insert nil)
(set-face-background 'diff-hl-delete nil)
(set-face-background 'diff-hl-change nil)
(define-fringe-bitmap 'diff-hl-bmp-middle [224] nil nil '(center repeated))
(define-fringe-bitmap 'diff-hl-bmp-delete [240 224 192 128] nil nil 'top))
(defun +vc-gutter-type-face-fn (type _pos)
@ -44,8 +41,15 @@
(if (eq type 'delete)
'diff-hl-bmp-delete
'diff-hl-bmp-middle))
(setq diff-hl-fringe-bmp-function #'+vc-gutter-type-at-pos-fn
diff-hl-draw-borders nil))
(advice-add #'diff-hl-fringe-bmp-from-pos :override #'+vc-gutter-type-at-pos-fn)
(advice-add #'diff-hl-fringe-bmp-from-type :override #'+vc-gutter-type-at-pos-fn)
(setq diff-hl-draw-borders nil)
(add-hook! 'diff-hl-mode-hook
(defun +vc-gutter-fix-diff-hl-faces-h ()
(mapc (doom-rpartial #'set-face-background nil)
'(diff-hl-insert
diff-hl-delete
diff-hl-change)))))
;; FIX: To minimize overlap between flycheck indicators and git-gutter/diff-hl
;; indicators in the left fringe.