This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: Fix spurious 'type return to continue' when scrolling TUI source window
- From: Stephane Carrez <stcarrez at nerim dot fr>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 01 Sep 2002 20:14:23 +0200
- Subject: [PATCH]: Fix spurious 'type return to continue' when scrolling TUI source window
Hi!
When we scroll TUI source window (page up/down for example), we obtain a
spurious 'type return to continue'. It is due to a gdb annotation that
is printed and later ignored by tui-out. But the \n increments the
gdb lines_printed.
I've committed this patch to fix that by using print_source_lines() instead
of identify_source_line() which is normally used only when producing gdb annotations.
The tui_out_new() fix is necessary to fix the recognition of output produced by
print_source_lines().
Committed on mainline.
Stephane
2002-09-01 Stephane Carrez <stcarrez@nerim.fr>
* tui-out.c (tui_out_new): Clear start_of_line.
* tuiSource.c (tuiVerticalSourceScroll): Use print_source_lines
to update the current source line.
Index: tui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-out.c,v
retrieving revision 1.2
diff -u -p -r1.2 tui-out.c
--- tui-out.c 19 Mar 2002 02:51:09 -0000 1.2
+++ tui-out.c 1 Sep 2002 15:52:59 -0000
@@ -398,7 +398,7 @@ tui_out_new (struct ui_file *stream)
data->stream = stream;
data->suppress_output = 0;
data->line = -1;
- data->start_of_line = 1;
+ data->start_of_line = 0;
return ui_out_new (&tui_ui_out_impl, data, flags);
}
Index: tuiSource.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiSource.c,v
retrieving revision 1.11
diff -u -p -r1.11 tuiSource.c
--- tuiSource.c 30 Aug 2002 20:23:34 -0000 1.11
+++ tuiSource.c 1 Sep 2002 15:52:59 -0000
@@ -359,7 +359,7 @@ tuiVerticalSourceScroll (TuiScrollDirect
if (l.lineNo <= 0)
l.lineNo = 1;
}
- if (identify_source_line (s, l.lineNo, 0, -1) == 1)
- tuiUpdateSourceWindowAsIs (srcWin, s, l, FALSE);
+
+ print_source_lines (s, l.lineNo, l.lineNo + 1, 0);
}
}