emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm 5d1c0781d8 1/5: Fix window error when current-buffer


From: ELPA Syncer
Subject: [nongnu] elpa/helm 5d1c0781d8 1/5: Fix window error when current-buffer has been killed in current session
Date: Wed, 15 Jun 2022 09:05:07 -0400 (EDT)

branch: elpa/helm
commit 5d1c0781d8af356ed5e45c7c48ab3ceb8a33e9a9
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Fix window error when current-buffer has been killed in current session
---
 helm-files.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/helm-files.el b/helm-files.el
index a391e71be4..3282905572 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -1041,7 +1041,11 @@ directories belonging to each visible windows."
 
 (defun helm-dwim-target-directory ()
   "Try to return a suitable directory according to `helm-dwim-target'."
-  (with-selected-window (get-buffer-window helm-current-buffer)
+  (with-selected-window (or
+                         ;; Try next-window if current-buffer has been
+                         ;; killed during this session probably by C-d.
+                         (get-buffer-window helm-current-buffer)
+                         (next-window (helm-window) 1))
     (let ((wins (remove (get-buffer-window helm-marked-buffer-name)
                         (window-list))))
       (expand-file-name



reply via email to

[Prev in Thread] Current Thread [Next in Thread]