branch: master
commit b114cf8a93224c85c51e95db52bf359131130476
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ace-window.el (aw-ignore-current): New defcustom
    
    * ace-window.el (aw-ignored-p): Use `aw-ignore-current'.
    
    Fixes #43
---
 ace-window.el |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ace-window.el b/ace-window.el
index f34a77a..791b34d 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -87,6 +87,10 @@
 Use M-0 `ace-window' to toggle this value."
   :type 'boolean)
 
+(defcustom aw-ignore-current nil
+  "When t, `ace-window' will ignore `selected-window'."
+  :type 'boolean)
+
 (defcustom aw-background t
   "When t, `ace-window' will dim out all buffers temporarily when used.'."
   :type 'boolean)
@@ -115,9 +119,11 @@ Use M-0 `ace-window' to toggle this value."
 ;;* Implementation
 (defun aw-ignored-p (window)
   "Return t if WINDOW should be ignored."
-  (and aw-ignore-on
-       (member (buffer-name (window-buffer window))
-               aw-ignored-buffers)))
+  (or (and aw-ignore-on
+           (member (buffer-name (window-buffer window))
+                   aw-ignored-buffers))
+      (and aw-ignore-current
+           (equal window (selected-window)))))
 
 (defun aw-window-list ()
   "Return the list of interesting windows."

Reply via email to