aboutsummaryrefslogtreecommitdiff
path: root/evil-common.el
diff options
context:
space:
mode:
Diffstat (limited to 'evil-common.el')
-rw-r--r--evil-common.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/evil-common.el b/evil-common.el
index ba47676..2ef3b23 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -1952,8 +1952,9 @@ or a marker object pointing nowhere."
(when (and (symbolp marker) (boundp marker))
(setq marker (symbol-value marker)))
(when (functionp marker)
- (funcall marker)
- (setq marker (point)))
+ (save-window-excursion
+ (funcall marker)
+ (setq marker (move-marker (make-marker) (point)))))
(when (markerp marker)
(if (eq (marker-buffer marker) (current-buffer))
(setq marker (marker-position marker))