mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-21 05:50:52 -07:00
fix(dired): prevent dirvish from killing root buffers on quit
`dirvish--clear-session' kills non-visible root buffers on quit, and `dirvish-reuse-session' set to `open' also kills the index buffer. This destroys the original dirvish-fd buffer when navigating through subdirectories and quitting. Change `dirvish-reuse-session' to `t' so root buffers survive both file opening and quit. Doom's existing `+dired--cleanup-dirvish-h' handles cleanup on project/workspace switches. Fix: #8591 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a0d6aac43f
commit
c097bc4f7f
1 changed files with 4 additions and 6 deletions
|
|
@ -82,12 +82,10 @@ Fixes #3939: unsortable dired entries on Windows."
|
|||
(set-popup-rule! "^ ?\\*\\(?:[Dd]irvish\\|SIDE :: \\).*" :ignore t)
|
||||
|
||||
;; Fixes #8038. This setting is for folks who expect to be able to switch back
|
||||
;; to dired buffers where the file is opened from. In other cases, don't
|
||||
;; recycle sessions. We don't want leftover buffers lying around, especially
|
||||
;; if users are reconfiguring Dirvish or trying to recover from an error. It's
|
||||
;; too easy to accidentally break Dirvish (e.g. by focusing the header window)
|
||||
;; at the moment. Starting from scratch isn't even that expensive, anyway.
|
||||
(setq dirvish-reuse-session 'open)
|
||||
;; to dired buffers where the file is opened from. Doom's cleanup hook
|
||||
;; (`+dired--cleanup-dirvish-h') handles killing sessions on project/workspace
|
||||
;; switches, so `t' is safe here.
|
||||
(setq dirvish-reuse-session t)
|
||||
|
||||
(if (modulep! +dirvish)
|
||||
(setq dirvish-attributes '(file-size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue