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

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

[elpa] master dabd1f8 205/272: ivy.el (ivy-avy): Make "C-g" cancel grace


From: Oleh Krehel
Subject: [elpa] master dabd1f8 205/272: ivy.el (ivy-avy): Make "C-g" cancel gracefully
Date: Mon, 25 Apr 2016 10:13:25 +0000

branch: master
commit dabd1f82c8960a038b905213a0561536d599ecac
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-avy): Make "C-g" cancel gracefully
    
    Fixes abo-abo/avy#140
---
 ivy.el |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ivy.el b/ivy.el
index 37648bb..d082c8e 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1080,9 +1080,10 @@ On error (read-only), call `ivy-on-del-error-function'."
             (avy--process
              (nreverse candidates)
              (avy--style-fn avy-style)))))
-    (ivy-set-index (- (line-number-at-pos candidate) 2))
-    (ivy--exhibit)
-    (ivy-done)))
+    (when (numberp candidate)
+      (ivy-set-index (- (line-number-at-pos candidate) 2))
+      (ivy--exhibit)
+      (ivy-done))))
 
 (defun ivy-sort-file-function-default (x y)
   "Compare two files X and Y.



reply via email to

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