branch: master
commit 1a33da4be117f5a6757ec94c42996979249373d7
Author: Thiago Marques de Melo <[email protected]>
Commit: Thiago Marques de Melo <[email protected]>
ivy.el (ivy-avy): Selects correct candidate
When using a display transformer.
Fixes #1255
---
ivy.el | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/ivy.el b/ivy.el
index 3dbd5bd..1b4fec3 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1340,12 +1340,9 @@ This string is inserted into the minibuffer."
(nreverse candidates)
(avy--style-fn avy-style)))))
(when (number-or-marker-p candidate)
- (goto-char candidate)
- (when (eq ivy-format-function 'ivy-format-function-arrow)
- (forward-char 2))
(ivy--done
- (buffer-substring-no-properties
- (point) (line-end-position))))))
+ (substring-no-properties
+ (nth (- (line-number-at-pos candidate) 2) ivy--old-cands))))))
(defun ivy-sort-file-function-default (x y)
"Compare two files X and Y.