From bbf1e7339eba06784dfe86643bb0fbddf5bb0342 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Wed, 24 Jun 2020 13:48:19 +0200 Subject: [PATCH] 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 0f7260b..450271d 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.