diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-10-27 06:56:07 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-10-27 06:56:07 +0200 |
commit | 3b2d6cd4eb06f1202b81c0b33841390c367a9207 (patch) | |
tree | afdc5b3eeb67a6dd4aa9d83961cad30d9a8fecfd /helm-ring.el | |
parent | 3ff680b7ee5aba7b49ec13780c5d44c210a2b2d8 (diff) |
Add current mark to mark-ring and revert previous change (#1891)
There is nothing to fix here as the bug with dups in mark-ring comes
from `push-mark` itself, advising `push-mark` fixes the problem.
* helm-ring.el (helm-mark-ring-get-candidates): Push current mark to
mark-ring when it is empty, otherwise use mark-ring.
* helm-utils.el (helm-save-current-pos-to-mark-ring): Revert previous.
Diffstat (limited to 'helm-ring.el')
-rw-r--r-- | helm-ring.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/helm-ring.el b/helm-ring.el index 556b4258..8b8fca6b 100644 --- a/helm-ring.el +++ b/helm-ring.el @@ -242,7 +242,9 @@ This is a command for `helm-kill-ring-map'." (defun helm-mark-ring-get-candidates () (with-helm-current-buffer - (cl-loop with marks = (if (mark t) (cons (mark-marker) mark-ring) mark-ring) + (cl-loop with marks = (if (and (mark t) (null mark-ring)) + (push (copy-marker (mark-marker)) mark-ring) + mark-ring) for marker in marks with max-line-number = (line-number-at-pos (point-max)) with width = (length (number-to-string max-line-number)) |