This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Patch: fix for new bug in console
- To: Insight List <insight at sourceware dot cygnus dot com>
- Subject: Patch: fix for new bug in console
- From: Tom Tromey <tromey at redhat dot com>
- Date: 08 Dec 2000 11:00:11 -0700
- Reply-To: tromey at redhat dot com
Yesterday's patch to console.itb introduced a bug.
Here is a recipe to see it:
* Run Insight
* Bring up Console
* Type `tk puts stderr foo'
* Type `q'
You'll get an error from Insight.
The problem is that the old code omitted trailing newlines from $text
but the new code preserves them.
This patch fixes the bug. Ok?
2000-12-08 Tom Tromey <tromey@redhat.com>
* console.itb (Console::invoke): Trim trailing newlines from
text.
Tom
Index: console.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/console.itb,v
retrieving revision 1.6
diff -u -r1.6 console.itb
--- console.itb 2000/12/07 19:49:40 1.6
+++ console.itb 2000/12/08 17:47:40
@@ -397,6 +397,7 @@
incr _invoking
+ set text [string trimright $text \n]
if {$text == ""} {
set text [lindex $_history 0]
$_twin insert {insert lineend} $text