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

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

[elpa] externals/ivy-explorer 5bf3b91 1/4: Fix other window command for


From: Stefan Monnier
Subject: [elpa] externals/ivy-explorer 5bf3b91 1/4: Fix other window command for posframe
Date: Wed, 17 Mar 2021 18:45:00 -0400 (EDT)

branch: externals/ivy-explorer
commit 5bf3b915bdb78f58fc657e616262d967266a4500
Author: Clemens Radermacher <clemera@posteo.net>
Commit: Clemens Radermacher <clemera@posteo.net>

    Fix other window command for posframe
---
 ivy-explorer.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/ivy-explorer.el b/ivy-explorer.el
index bae59f1..ec5a033 100644
--- a/ivy-explorer.el
+++ b/ivy-explorer.el
@@ -131,8 +131,8 @@ Only the background color is significant."
       (define-key map (kbd "C-j") 'ivy-explorer-alt-done)
       (define-key map (kbd "C-x d") 'ivy-explorer-dired)
 
-      (define-key map (kbd "C-x o") 'ivy-explorer-select-lv)
-      (define-key map (kbd "'") 'ivy-explorer-select-lv)
+      (define-key map (kbd "C-x o") 'ivy-explorer-other-window)
+      (define-key map (kbd "'") 'ivy-explorer-other-window)
 
       (define-key map (kbd "M-o") 'ivy-explorer-dispatching-done)
       (define-key map (kbd "C-'") 'ivy-explorer-avy)
@@ -656,9 +656,12 @@ Call the permanent action if possible.")
 
 ;; * Ivy explorer mode
 
-(defun ivy-explorer-select-lv ()
+(defun ivy-explorer-other-window ()
   (interactive)
-  (select-window (get-buffer-window " *ivy-explorer*")))
+  (let ((w (or (get-buffer-window " *ivy-explorer*")
+               (get-buffer-window (ivy-state-buffer ivy-last)))))
+    (when (window-live-p w)
+      (select-window w))))
 
 (defun ivy-explorer-max ()
   "Default for `ivy-explorer-max-function'."



reply via email to

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