(defun dired--find-possibly-alternative-file@dont-kill-split-buffer (&rest args)
"Advice around original function with ARGS to avoid killing the split buffer."
(let ((dired-kill-when-opening-new-dired-buffer
(and dired-kill-when-opening-new-dired-buffer
(not (memq (current-buffer)
(mapcar #'window-buffer
(remove
(get-buffer-window (current-buffer))
(window-list))))))))
(apply args)))
(advice-add 'dired--find-possibly-alternative-file
:around 'dired--find-possibly-alternative-file@dont-kill-split-buffer)
3 个赞