branch: elpa/helm
commit 83d61407d9e42d52d2a01bffcd380608e9b84126
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Don't run helm-goto-line-before-hook fn in helm-current-buffer
    
    but in the buffer where helm jump.
    
    This allows saving to mark ring or register the last position in this
    buffer and not to only helm-current-buffer.
---
 helm-utils.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/helm-utils.el b/helm-utils.el
index 2099963a79..9a2f85e213 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -538,17 +538,15 @@ Animation is used unless NOANIM is non--nil."
 (defun helm-save-pos-to-register-before-jump ()
   "Save current buffer position to `helm-save-pos-before-jump-register'.
 To use this add it to `helm-goto-line-before-hook'."
-  (with-helm-current-buffer
-    (unless helm-in-persistent-action
-      (point-to-register helm-save-pos-before-jump-register))))
+  (unless helm-in-persistent-action
+    (point-to-register helm-save-pos-before-jump-register)))
 
 (defun helm-save-current-pos-to-mark-ring ()
   "Save current buffer position to mark ring.
 To use this add it to `helm-goto-line-before-hook'."
-  (with-helm-current-buffer
-    (unless helm-in-persistent-action
-      (set-marker (mark-marker) (point))
-      (push-mark (point) 'nomsg))))
+  (unless helm-in-persistent-action
+    (set-marker (mark-marker) (point))
+    (push-mark (point) 'nomsg)))
 
 (defun helm-displaying-source-names ()
   "Return the list of sources name for this helm session."

Reply via email to