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

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

[elpa] externals/ace-window 58463b4 67/92: ace-window.el (aw-select): Fi


From: Stefan Monnier
Subject: [elpa] externals/ace-window 58463b4 67/92: ace-window.el (aw-select): Fix when selecting from an ignored window
Date: Wed, 17 Mar 2021 18:39:24 -0400 (EDT)

branch: externals/ace-window
commit 58463b4cb05615e226d98abc72aa11ec73c3d156
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ace-window.el (aw-select): Fix when selecting from an ignored window
    
    When there are three windows, and the ignored one is selected, the
    length of (aw-window-list) is 2, but we should still dispatch because
    neither of the 2 is selected at the moment.
    
    Fixes #161
---
 ace-window.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ace-window.el b/ace-window.el
index ae77bf1..bc9a446 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -216,9 +216,7 @@ or
            ;; Ignore major-modes and buffer-names in `aw-ignored-buffers'.
            (or (memq (buffer-local-value 'major-mode (window-buffer window))
                      aw-ignored-buffers)
-               (member (buffer-name (window-buffer window)) 
aw-ignored-buffers))
-           (or aw-ignore-current
-               (not (equal window (selected-window)))))
+               (member (buffer-name (window-buffer window)) 
aw-ignored-buffers)))
       ;; ignore child frames
       (and (fboundp 'frame-parent) (frame-parent (window-frame window)))
       ;; Ignore selected window if `aw-ignore-current' is non-nil.
@@ -480,7 +478,8 @@ Amend MODE-LINE to the mode line for the duration of the 
selection."
                    (when (eq aw-action 'exit)
                      (setq aw-action nil)))
                  (or (car wnd-list) start-window))
-                ((and (<= (length wnd-list) aw-dispatch-when-more-than)
+                ((and (<= (+ (length wnd-list) (if (aw-ignored-p start-window) 
1 0))
+                          aw-dispatch-when-more-than)
                       (not aw-dispatch-always)
                       (not aw-ignore-current))
                  (let ((wnd (next-window nil nil next-window-scope)))



reply via email to

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