branch: externals/avy commit 5127f993f9d01d032f9339500ae5f8f57ed3a55a Author: Federico Tedin <federicote...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
avy.el (avy-process): Restart on fail for avy-style 'words Fixes #283 --- avy.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/avy.el b/avy.el index c9c261785f..27680da511 100644 --- a/avy.el +++ b/avy.el @@ -451,7 +451,8 @@ KEYS is the path from the root of `avy-tree' to LEAF." "The default handler for a bad CHAR." (let (dispatch) (cond ((setq dispatch (assoc char avy-dispatch-alist)) - (setq avy-action (cdr dispatch)) + (unless (eq avy-style 'words) + (setq avy-action (cdr dispatch))) (throw 'done 'restart)) ((memq char '(?\e ?\C-g)) ;; exit silently @@ -862,8 +863,10 @@ multiple OVERLAY-FN invocations." (res (avy--process-1 candidates overlay-fn cleanup-fn))) (cond ((null res) - (message "zero candidates") - t) + (if (eq avy-style 'words) + (avy-process original-cands overlay-fn cleanup-fn) + (message "zero candidates") + t)) ((eq res 'restart) (avy-process original-cands overlay-fn cleanup-fn)) ;; ignore exit from `avy-handler-function'