branch: externals/avy
commit bbf1e7339eba06784dfe86643bb0fbddf5bb0342
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
avy.el (avy-order-closest): Work with avy-goto-line
Fixes #307
---
avy.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/avy.el b/avy.el
index 0f7260b855..450271d84b 100644
--- a/avy.el
+++ b/avy.el
@@ -388,7 +388,10 @@ SEQ-LEN is how many elements of KEYS it takes to identify
a match."
(nreverse path-alist)))
(defun avy-order-closest (x)
- (abs (- (caar x) (point))))
+ (abs (- (if (numberp (car x))
+ (car x)
+ (caar x))
+ (point))))
(defvar avy-command nil
"Store the current command symbol.