[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 943eb01 108/184: counsel.el (counsel-mark-ring): Goto actu
From: |
Oleh Krehel |
Subject: |
[elpa] master 943eb01 108/184: counsel.el (counsel-mark-ring): Goto actual point instead of line |
Date: |
Wed, 16 Oct 2019 13:15:01 -0400 (EDT) |
branch: master
commit 943eb016d11f613492711822940df62755da152f
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-mark-ring): Goto actual point instead of line
Re #2254
---
counsel.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/counsel.el b/counsel.el
index ca13fb3..fab279e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3751,11 +3751,10 @@ This variable has no effect unless
(defun counsel--mark-ring-update-fn ()
"Show preview by candidate."
- (let ((linenum (string-to-number (ivy-state-current ivy-last))))
+ (let ((pos (get-text-property 0 'point (ivy-state-current ivy-last))))
(counsel--mark-ring-delete-highlight)
- (unless (= linenum 0)
- (with-ivy-window
- (forward-line (- linenum (line-number-at-pos)))))))
+ (with-ivy-window
+ (goto-char pos))))
;;;###autoload
(defun counsel-mark-ring ()
@@ -3771,7 +3770,7 @@ Obeys `widen-automatically', which see."
(let ((linum (line-number-at-pos))
(line (buffer-substring
(line-beginning-position) (line-end-position))))
- (cons (format fmt linum line) (point)))))
+ (propertize (format fmt linum line) 'point (point)))))
(marks (copy-sequence mark-ring))
(marks (delete-dups marks))
(marks
@@ -3792,7 +3791,7 @@ Obeys `widen-automatically', which see."
:update-fn #'counsel--mark-ring-update-fn
:sort counsel-mark-ring-sort-selections
:action (lambda (cand)
- (let ((pos (cdr-safe cand)))
+ (let ((pos (get-text-property 0 'point cand)))
(when pos
(unless (<= (point-min) pos (point-max))
(if widen-automatically
- [elpa] master 03b3f82 075/184: ivy.el (ivy-partial): Use ivy--filter in place of all-completions, (continued)
- [elpa] master 03b3f82 075/184: ivy.el (ivy-partial): Use ivy--filter in place of all-completions, Oleh Krehel, 2019/10/16
- [elpa] master daf4683 081/184: ivy.el (ivy--directory-done): Inhibit distracting TRAMP message for /sudo::, Oleh Krehel, 2019/10/16
- [elpa] master 9e03f36 095/184: ivy-test.el: Turn two tests back on, Oleh Krehel, 2019/10/16
- [elpa] master 4b7b075 093/184: ivy-test.el (ivy-test-inhibit-message): Add, Oleh Krehel, 2019/10/16
- [elpa] master 967d046 091/184: ivy-test.el (counsel-yank-pop): Fix on Windows, Oleh Krehel, 2019/10/16
- [elpa] master cfbf481 089/184: Lazy load ffap, Oleh Krehel, 2019/10/16
- [elpa] master 464875a 103/184: counsel.el (counsel-mark-ring): Refactor for reducing nested let, Oleh Krehel, 2019/10/16
- [elpa] master 0c1901e 100/184: ivy.el (ivy--regex-ignore-order): Fix docstring, Oleh Krehel, 2019/10/16
- [elpa] master 6905e6c 097/184: counsel.el (counsel--rg-targets): Adjust for ivy-occur buffers, Oleh Krehel, 2019/10/16
- [elpa] master e6171e2 098/184: ivy-hydra.el (ivy-dispatching-done-hydra): Fix for ivy-resume, Oleh Krehel, 2019/10/16
- [elpa] master 943eb01 108/184: counsel.el (counsel-mark-ring): Goto actual point instead of line,
Oleh Krehel <=
- [elpa] master 36045f7 003/184: doc/Changelog.org: Fixup, Oleh Krehel, 2019/10/16
- [elpa] master 4389a26 056/184: ivy-overlay.el (ivy-overlay-show-after): Check window height better, Oleh Krehel, 2019/10/16
- [elpa] master 1332ab0 068/184: counsel.el (counsel-compile-env-pattern): Fix regex typo, Oleh Krehel, 2019/10/16
- [elpa] master beb3aee 080/184: ivy.el (ivy--directory-done): Handle "/ C-j" on remote, Oleh Krehel, 2019/10/16
- [elpa] master e62e7de 090/184: ivy-test.el (ivy-test-run-tests): Fix, Oleh Krehel, 2019/10/16
- [elpa] master 73d9f4a 083/184: Place cursor at the begging of matches (for grep), Oleh Krehel, 2019/10/16
- [elpa] master 361cf87 070/184: ivy-test.el (counsel-find-file-with-dollars): Remove, Oleh Krehel, 2019/10/16
- [elpa] master 7cca04a 088/184: doc/ivy.org: Document the marking feature, Oleh Krehel, 2019/10/16
- [elpa] master 3be5e78 084/184: counsel.el (counsel-git-grep-action): Check re-search-forward, Oleh Krehel, 2019/10/16
- [elpa] master 4c1f6cd 094/184: ivy-test.el: Update, Oleh Krehel, 2019/10/16