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

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

[elpa] externals/ace-window 6c52b0b 37/92: ace-window.el (aw-clean-up-av


From: Stefan Monnier
Subject: [elpa] externals/ace-window 6c52b0b 37/92: ace-window.el (aw-clean-up-avy-current-path): Extract
Date: Wed, 17 Mar 2021 18:39:17 -0400 (EDT)

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

    ace-window.el (aw-clean-up-avy-current-path): Extract
    
    Re #119
---
 ace-window.el | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/ace-window.el b/ace-window.el
index bdba85e..ee8e20d 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -366,6 +366,15 @@ pixels."
   (aw-switch-to-window window)
   (aw-make-frame))
 
+(defun aw-clean-up-avy-current-path ()
+  ;; Remove any possible ace-window command char that may
+  ;; precede the last specified window label, so
+  ;; functions can use `avy-current-path' as the chosen
+  ;; window label.
+  (when (and (> (length avy-current-path) 0)
+             (assq (aref avy-current-path 0) aw-dispatch-alist))
+    (setq avy-current-path (substring avy-current-path 1))))
+
 (defun aw-dispatch-default (char)
   "Perform an action depending on CHAR."
   (cond ((avy-mouse-event-window char))
@@ -383,13 +392,6 @@ pixels."
                        (aw-set-mode-line (format " Ace - %s" description)))
                    (funcall fn)
                    (throw 'done 'exit)))
-             ;; Remove any possible ace-window command char that may
-             ;; precede the last specified window label, so
-             ;; functions can use `avy-current-path' as the chosen
-             ;; window label.
-             (when (and (> (length avy-current-path) 0)
-                        (assq (aref avy-current-path 0) aw-dispatch-alist))
-               (setq avy-current-path (substring avy-current-path 1)))
              ;; Prevent any char from triggering an avy dispatch command.
              (let ((avy-dispatch-alist))
                (avy-handler-default char)))))))



reply via email to

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