Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions dirvish.el
Original file line number Diff line number Diff line change
Expand Up @@ -1127,10 +1127,13 @@ Optionally, use CURSOR as the enabled cursor type."
(dirvish-use-header-line t))))))

(defun dirvish-pre-redisplay-h (window)
"Record root WINDOW and redisplay sessions in selected frame."
(setq dirvish--selected-window (frame-selected-window))
(when-let* ((dv (dirvish-curr))) (setf (dv-root-window dv) window))
(dirvish--redisplay))
"Record root WINDOW and redisplay sessions in selected frame.
Only act when WINDOW is the selected window in its frame to prevent
a redisplay feedback loop when dirvish is open in multiple frames."
(when (eq (frame-selected-window) window)
(setq dirvish--selected-window window)
(when-let* ((dv (dirvish-curr))) (setf (dv-root-window dv) window))
(dirvish--redisplay)))

(defun dirvish-post-command-h ()
"Reset cursor shape and position and update preview."
Expand Down