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

    fix(core): do not reuse peek session
    
    Prevent *embark-export-dired* using the peek session
---
 dirvish.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dirvish.el b/dirvish.el
index 9ce9cf6c64..f7c11e6a3a 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -1474,7 +1474,9 @@ With optional NOSELECT just find files but do not select 
them."
   "Return buffer for DIR-OR-LIST with FLAGS, FN is `dired-noselect'."
   (let* ((dir (if (consp dir-or-list) (car dir-or-list) dir-or-list))
          (key (file-name-as-directory (expand-file-name dir)))
-         (dv (or (dirvish-curr) (dirvish--get-session) (dirvish--new)))
+         (dvc (dirvish-curr))
+         (dv (if (and dvc (not (eq (dv-type dvc) 'peek))) dvc
+               (or (dirvish--get-session) (dirvish--new))))
          (bname buffer-file-name) (remote (file-remote-p dir))
          (flags (or flags (dv-ls-switches dv)))
          (mc dirvish-large-directory-threshold)

Reply via email to