branch: externals/ace-window
commit 188c07a7aa8635e11661b39082361d770287a515
Author: Nick Drozd <[email protected]>
Commit: Nick Drozd <[email protected]>
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."