branch: master
commit 444081018adfb63e324fcf479dcc318435517069
Author: fabacino <[email protected]>
Commit: fabacino <[email protected]>
ivy.el (ivy-avy): Get rid of error message when exiting avy silently
---
ivy.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ivy.el b/ivy.el
index ea306dd..b7a30ef 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1294,10 +1294,11 @@ On error (read-only), call `ivy-on-del-error-function'."
(avy--process
(nreverse candidates)
(avy--style-fn avy-style)))))
- (goto-char candidate)
- (ivy--done
- (buffer-substring-no-properties
- (point) (line-end-position)))))
+ (when (number-or-marker-p candidate)
+ (goto-char candidate)
+ (ivy--done
+ (buffer-substring-no-properties
+ (point) (line-end-position))))))
(defun ivy-sort-file-function-default (x y)
"Compare two files X and Y.