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

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

[elpa] externals/avy bbf1e7339e 24/31: avy.el (avy-order-closest): Work


From: ELPA Syncer
Subject: [elpa] externals/avy bbf1e7339e 24/31: avy.el (avy-order-closest): Work with avy-goto-line
Date: Mon, 13 Feb 2023 21:57:27 -0500 (EST)

branch: externals/avy
commit bbf1e7339eba06784dfe86643bb0fbddf5bb0342
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    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.



reply via email to

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