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

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

[elpa] externals/ace-window 188c07a 26/92: Add aw--switch-buffer with iv


From: Stefan Monnier
Subject: [elpa] externals/ace-window 188c07a 26/92: Add aw--switch-buffer with ivy and ido
Date: Wed, 17 Mar 2021 18:39:15 -0400 (EDT)

branch: externals/ace-window
commit 188c07a7aa8635e11661b39082361d770287a515
Author: Nick Drozd <nicholasdrozd@gmail.com>
Commit: Nick Drozd <nicholasdrozd@gmail.com>

    Add aw--switch-buffer with ivy and ido
---
 ace-window.el | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/ace-window.el b/ace-window.el
index 1d750e3..f6a3172 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -502,9 +502,15 @@ Windows are numbered top down, left to right."
 (defun aw-switch-buffer-in-window (window)
   "Select buffer in WINDOW."
   (aw-switch-to-window window)
-  (if (bound-and-true-p ivy-mode)
-      (ivy-switch-buffer)
-    (call-interactively 'switch-to-buffer)))
+  (aw--switch-buffer))
+
+(defun aw--switch-buffer ()
+  (cond ((bound-and-true-p ivy-mode)
+         (ivy-switch-buffer))
+        ((bound-and-true-p ido-mode)
+         (ido-switch-buffer))
+        (t
+         (call-interactively 'switch-to-buffer))))
 
 (defcustom aw-swap-invert nil
   "When non-nil, the other of the two swapped windows gets the point."



reply via email to

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