diff options
| author | panda <daniel.phan36@gmail.com> | 2019-08-18 17:58:56 -0700 |
|---|---|---|
| committer | Eivind Fonn <evfonn@gmail.com> | 2019-11-05 09:52:55 +0100 |
| commit | 45606ec27cbeb7d074ab92658b496950c40dc76b (patch) | |
| tree | 3cf2da0549741b4815a8d7be8fbdb5d37b5204cf /evil-common.el | |
| parent | 820b03cdb802db7c6a5edbc4b081e463be465bb3 (diff) | |
Fix evil-get-marker switching buffers
If evil-jump-backward-swap gets called (for the ` and ' marks) and
switches the current buffer, evil-get-marker won't restore the buffer.
Diffstat (limited to 'evil-common.el')
| -rw-r--r-- | evil-common.el | 5 |
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)) |
