Mercurial > emacs
diff lisp/progmodes/gdb-ui.el @ 55330:df2107598877
(gdb-goto-breakpoint): Make buffer display file at breakpoint.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Mon, 03 May 2004 00:34:50 +0000 |
parents | 4440fe0e7dc6 |
children | 1aaa031e318c |
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el Mon May 03 00:33:21 2004 +0000 +++ b/lisp/progmodes/gdb-ui.el Mon May 03 00:34:50 2004 +0000 @@ -1216,11 +1216,13 @@ (let ((line (match-string 2)) (file (match-string 1))) (save-selected-window - (gdb-display-buffer (find-file-noselect - (if (file-exists-p file) - file - (expand-file-name file gdb-cdir)))) - (goto-line (string-to-number line)))))) + (let* ((buf (find-file-noselect (if (file-exists-p file) + file + (expand-file-name file gdb-cdir)))) + (window (gdb-display-buffer buf))) + (with-current-buffer buf + (goto-line (string-to-number line)) + (set-window-point window (point)))))))) (defun gdb-mouse-goto-breakpoint (event) "Display the file in the source buffer at the selected breakpoint."