]> git.eshelyaron.com Git - emacs.git/commitdiff
(gud-display-line): Use gdb-display-buffer. Set gdb-source-window.
authorNick Roberts <nickrob@snap.net.nz>
Thu, 13 Jul 2006 21:57:05 +0000 (21:57 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Thu, 13 Jul 2006 21:57:05 +0000 (21:57 +0000)
lisp/progmodes/gud.el

index c57c88d3ece02ff3ff21bf2510819ac2e1ac566a..97e54135a6f0ba7fdcbd0d45aab36c565d9d49ee 100644 (file)
@@ -2763,7 +2763,8 @@ Obeying it means displaying in another window the specified file and line."
            (gud-find-file true-file)))
         (window (and buffer (or (get-buffer-window buffer)
                                 (if (memq gud-minor-mode '(gdbmi gdba))
-                                    (gdb-display-source-buffer buffer))
+                                    (unless (gdb-display-source-buffer buffer)
+                                      (gdb-display-buffer buffer nil)))
                                 (display-buffer buffer))))
         (pos))
     (if buffer
@@ -2793,7 +2794,10 @@ Obeying it means displaying in another window the specified file and line."
            (cond ((or (< pos (point-min)) (> pos (point-max)))
                   (widen)
                   (goto-char pos))))
-         (if window (set-window-point window gud-overlay-arrow-position))))))
+         (when window 
+           (set-window-point window gud-overlay-arrow-position)
+           (if (memq gud-minor-mode '(gdbmi gdba))
+               (setq gdb-source-window window)))))))
 
 ;; The gud-call function must do the right thing whether its invoking
 ;; keystroke is from the GUD buffer itself (via major-mode binding)