summaryrefslogtreecommitdiff
path: root/lisp/frameset.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2014-02-11 21:48:23 +0100
committerJuanma Barranquero <lekktu@gmail.com>2014-02-11 21:48:23 +0100
commit26c5ecd9de74e9bff37bd176cb3a045cc645f84b (patch)
treef4863a24a52a0fad4ca3cd8e095f8d35394f9bf3 /lisp/frameset.el
parent20c7a2b4e2ea1ab1f0400a86c029b132c233d714 (diff)
downloademacs-26c5ecd9de74e9bff37bd176cb3a045cc645f84b.tar.gz
lisp/frameset.el (frameset--jump-to-register): Fix bug#16696.
Select the required window and buffer before restoring position.
Diffstat (limited to 'lisp/frameset.el')
-rw-r--r--lisp/frameset.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/frameset.el b/lisp/frameset.el
index 7b8d613b836..aa8bb196fff 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -522,7 +522,6 @@ It must return:
Frame parameters not on this alist are passed intact, as if they were
defined with ACTION = nil.")
-
(defvar frameset--target-display nil
;; Either (minibuffer . VALUE) or nil.
;; This refers to the current frame config being processed inside
@@ -1217,7 +1216,12 @@ Called from `jump-to-register'. Internal use only."
(let ((frame (frameset-frame-with-id (aref data 1))))
(when frame
(select-frame-set-input-focus frame)
- (goto-char (aref data 2))))))
+ (let* ((position (aref data 2))
+ (buffer (marker-buffer position))
+ (window (get-buffer-window buffer frame)))
+ (when (and window (window-live-p window))
+ (set-frame-selected-window frame window)
+ (with-current-buffer buffer (goto-char position))))))))
;;;###autoload
(defun frameset-to-register (register)