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

    fix: get reset fringe width from `frame-parameter`
---
 dirvish.el               | 7 ++++---
 extensions/dirvish-vc.el | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dirvish.el b/dirvish.el
index bbb6bc2306..10dc783be8 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -555,9 +555,9 @@ ARGS is a list of keyword arguments for `dirvish' struct."
 (defun dirvish--clear-session (dv &optional from-quit)
   "Reset DV's slot and kill its buffers.
 FROM-QUIT is used to signify the calling command."
-  (let ((index (cdr (dv-index dv)))
-        (fringe (dirvish-prop :fringe)))
-    (when fringe (set-window-fringes nil fringe) (dirvish-prop :fringe nil))
+  (let ((index (cdr (dv-index dv))))
+    (when (dirvish-prop :fringe)
+      (set-window-fringes nil (frame-parameter nil 'left-fringe)))
     (if (not (dv-curr-layout dv))
         (cl-loop for (_d . b) in (dv-roots dv)
                  when (and (not (get-buffer-window b))
@@ -1321,6 +1321,7 @@ INHIBIT-SETUP is non-nil."
     (dirvish--init-util-buffers dv)
     (dirvish--setup-mode-line dv)
     (when w-order (let ((ignore-window-parameters t)) (delete-other-windows)))
+    (dirvish-prop :fringe nil)
     (dirvish--change-selected)
     (dolist (pane w-order)
       (let* ((buf (dirvish--util-buffer pane dv nil (eq pane 'preview)))
diff --git a/extensions/dirvish-vc.el b/extensions/dirvish-vc.el
index af07ac17d8..0025788805 100644
--- a/extensions/dirvish-vc.el
+++ b/extensions/dirvish-vc.el
@@ -21,7 +21,7 @@
 (defclass dirvish-vc-preview (transient-switches) ()
   "Class for dirvish vc-* preview dispatchers.")
 
-(defcustom dirvish-vc-state-fringe 3
+(defcustom dirvish-vc-state-fringe 2
   "The width of the fringe used to display the vc state indicator."
   :group 'dirvish :type 'integer)
 

Reply via email to