summaryrefslogtreecommitdiff
path: root/lisp/gud.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-05-02 21:20:55 +0000
committerRichard M. Stallman <rms@gnu.org>1996-05-02 21:20:55 +0000
commit36d6372a4040656aabfbde65ecdfab51c475370c (patch)
tree6cdb149f544dd3b3c0a00a3d72d0f161045e4200 /lisp/gud.el
parentf0e1cd33545b7494c2884f3e8359847bb6cb29d6 (diff)
downloademacs-36d6372a4040656aabfbde65ecdfab51c475370c.tar.gz
(gud-display-line): Switch to gud buffer before calling gud-find-file.
Diffstat (limited to 'lisp/gud.el')
-rw-r--r--lisp/gud.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index fac0be43175..b42d9a20011 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -1318,7 +1318,11 @@ Obeying it means displaying in another window the specified file and line."
(defun gud-display-line (true-file line)
(let* ((last-nonmenu-event t) ; Prevent use of dialog box for questions.
- (buffer (gud-find-file true-file))
+ (buffer
+ (save-excursion
+ (or (eq (current-buffer) gud-comint-buffer)
+ (set-buffer gud-comint-buffer))
+ (gud-find-file true-file)))
(window (display-buffer buffer))
(pos))
;;; (if (equal buffer (current-buffer))