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

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

[elpa] externals/ivy-avy bf041685bf 1/2: Merge branch 'master' into exte


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-avy bf041685bf 1/2: Merge branch 'master' into externals/ivy-avy
Date: Mon, 10 Apr 2023 14:31:21 -0400 (EDT)

branch: externals/ivy-avy
commit bf041685bf53678ab2687ce31ccac9b496f5e056
Merge: bd86621cc4 91ba01e450
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Merge branch 'master' into externals/ivy-avy
---
 ivy-avy.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/ivy-avy.el b/ivy-avy.el
index e4c97b407b..2f57f426cf 100644
--- a/ivy-avy.el
+++ b/ivy-avy.el
@@ -1,6 +1,6 @@
 ;;; ivy-avy.el --- Avy integration for Ivy -*- lexical-binding: t -*-
 
-;; Copyright (C) 2020-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
 ;; Author: Oleh Krehel <ohwoeowho@gmail.com>
 ;; URL: https://github.com/abo-abo/swiper
@@ -62,11 +62,15 @@
 (defun ivy-avy--action (pt)
   "Select the candidate represented by PT."
   (when (number-or-marker-p pt)
-    (let ((bnd (ivy--minibuffer-index-bounds
-                ivy--index ivy--length ivy-height)))
+    (let* ((bnd (ivy--minibuffer-index-bounds
+                 ivy--index ivy--length ivy-height))
+           (idx (+ (car bnd) (- (line-number-at-pos pt) 2)))
+           (coll (if (ivy-state-dynamic-collection ivy-last)
+                     ivy--all-candidates
+                   ivy--old-cands)))
       (ivy--done
        (substring-no-properties
-        (nth (+ (car bnd) (- (line-number-at-pos pt) 2)) ivy--old-cands))))))
+        (nth idx coll))))))
 
 (defun ivy-avy--handler-function (char)
   "Handle CHAR that's not on `avy-keys'."



reply via email to

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