branch: elpa/dirvish
commit 3043bc2976c330b74df71e6446d32cef4fa84a7b
Author: Alex Lu <hellosimon1...@hotmail.com>
Commit: Alex Lu <hellosimon1...@hotmail.com>

    refactor: remove hack for `zoom-mode`
    
    This hack results in a misaligned side buffer.
---
 dirvish.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dirvish.el b/dirvish.el
index f7c11e6a3a..452c3b3f9b 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -1129,9 +1129,7 @@ Optionally, use CURSOR as the enabled cursor type."
 (defun dirvish-pre-redisplay-h (window)
   "Record root WINDOW and redisplay sessions in selected frame."
   (setq dirvish--selected-window (frame-selected-window))
-  (let* ((dv (dirvish-curr)) (lyt (dv-curr-layout dv)) (sf (dv-size-fixed dv)))
-    (setf (dv-root-window dv) window)
-    (when (and (not lyt) sf) (setq window-size-fixed sf)))
+  (when-let* ((dv (dirvish-curr))) (setf (dv-root-window dv) window))
   (dirvish--redisplay))
 
 (defun dirvish-post-command-h ()
@@ -1393,11 +1391,12 @@ Dirvish sets `revert-buffer-function' to this function."
                            (window-parameters . ((no-other-window . t))))))
          (w-order (and layout (dirvish--window-split-order)))
          (window-safe-min-height 0) (window-resize-pixelwise t)
-         (lh (line-pixel-height)) (gui? (display-graphic-p))
+         (lh (line-pixel-height)) (gui? (display-graphic-p)) sf
          (mh (dirvish--mode-line-height t)) (hh (dirvish--mode-line-height t 
t)))
     (setf (dv-index dv) (cons (dirvish-prop :root) (current-buffer)))
     ;; only refresh window config before creating fullframe layout
     (setf (dv-winconf dv) (when layout (or conf 
(current-window-configuration))))
+    (and (not layout) (setq sf (dv-size-fixed dv)) (setq window-size-fixed sf))
     (when layout (dirvish--init-special-buffers dv))
     (dirvish--setup-mode-line dv)
     (when w-order (let ((ignore-window-parameters t)) (delete-other-windows)))

Reply via email to