refactor(dired,vc-gutter): setup for tty frames

A recent commit (c53f63b) allows me to simplify this a bit.

Ref: c53f63b96e
Ref: #8001
This commit is contained in:
Henrik Lissner 2024-08-28 15:08:46 -04:00
parent c53f63b96e
commit 14478064af
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 23 additions and 17 deletions

View file

@ -107,7 +107,11 @@ Fixes #3939: unsortable dired entries on Windows."
:before #'dirvish-data-for-dir
(when (and setup (memq 'vc-state dirvish-attributes))
(set-window-fringes nil 5 1)))
(push 'vc-state dirvish-attributes))
;; The vc-gutter module uses `diff-hl-dired-mode' + `diff-hl-margin-mode'
;; for diffs in dirvish buffers. `vc-state' uses overlays, so they won't be
;; visible in the terminal.
(when (or (daemonp) (display-graphic-p))
(push 'vc-state dirvish-attributes)))
(when (modulep! +icons)
(setq dirvish-subtree-always-show-state t)