branch: elpa/dirvish
commit 6df7fe856f2f3267a73f873b7eed58a2a6edbbd8
Author: Alex Lu <[email protected]>
Commit: Alex Lu <[email protected]>
fix(core): `dirvish--init-session` should only run on root-window
dirvish-side--auto-jump sometimes incorrectly init session on wrong windows
because of this mistake.
See: #277
---
dirvish.el | 2 +-
extensions/dirvish-vc.el | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dirvish.el b/dirvish.el
index 14be5a7d10..ec079fe37d 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -808,7 +808,7 @@ When FORCE, ensure the preview get refreshed."
(defun dirvish-winbuf-change-h (window)
"Rebuild layout once buffer in WINDOW changed."
- (with-current-buffer (window-buffer window)
+ (with-selected-window window
(when-let* ((dv (dirvish-curr)))
(let ((saved-layout (car (dv-layout dv)))
(saved-winconf (dv-winconf dv)))
diff --git a/extensions/dirvish-vc.el b/extensions/dirvish-vc.el
index 85b2a882ae..6315be0387 100644
--- a/extensions/dirvish-vc.el
+++ b/extensions/dirvish-vc.el
@@ -129,7 +129,7 @@ detail explanation of these states."
(dirvish-define-attribute vc-state
"The version control state at left fringe.
This attribute only works on graphic displays."
- ;; Avoid setting fringes constantly, which is expensive and slows down Emacs.
+ ;; Avoid setting fringes constantly
(unless (= (car (window-fringes)) dirvish-vc-state-fringe)
(set-window-fringes nil dirvish-vc-state-fringe dirvish-window-fringe))
(let ((ov (make-overlay l-beg l-beg)))
@@ -137,7 +137,7 @@ This attribute only works on graphic displays."
(state (dirvish-attribute-cache f-name :vc-state))
(face (alist-get state dirvish-vc-state-face-alist))
(display `(left-fringe dirvish-vc-gutter . ,(cons face nil))))
- (overlay-put
+ (overlay-put ; TODO: very slow when the directory doesn't have any commit
ov 'before-string (propertize " " 'display display)))
`(ov . ,ov)))