diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-05-13 18:28:53 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-05-13 18:28:53 +0200 |
commit | b518c2374e167d373b148956731caaff8d018703 (patch) | |
tree | fd558fd5d9097b540769ee87fca9ed2fb58182a1 /helm-ring.el | |
parent | c4d2b0a06914fec9b9f2e9ae3403ee348c664731 (diff) |
Save current position to mark-ring when switching with it (#1770).
* helm-ring.el (helm-mark-ring-default-action): Do it, save helm-yank-point as
well and maybe cleanup overlays.
Diffstat (limited to 'helm-ring.el')
-rw-r--r-- | helm-ring.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/helm-ring.el b/helm-ring.el index d31eaa84..4217ed52 100644 --- a/helm-ring.el +++ b/helm-ring.el @@ -234,9 +234,14 @@ This is a command for `helm-kill-ring-map'." finally return recip))) (defun helm-mark-ring-default-action (candidate) - (switch-to-buffer (marker-buffer candidate)) - (helm-goto-char candidate) - (helm-highlight-current-line)) + (let ((target (copy-marker candidate))) + (switch-to-buffer (marker-buffer candidate)) + (helm-log-run-hook 'helm-goto-line-before-hook) + (helm-match-line-cleanup) + (with-helm-current-buffer + (unless helm-yank-point (setq helm-yank-point (point)))) + (helm-goto-char target) + (helm-highlight-current-line))) (defvar helm-source-mark-ring (helm-build-sync-source "mark-ring" |