* Patch: fix for new bug in console
@ 2000-12-08 9:48 Tom Tromey
2000-12-08 12:05 ` Fernando Nasser
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2000-12-08 9:48 UTC (permalink / raw)
To: Insight List
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch: fix for new bug in console
2000-12-08 9:48 Patch: fix for new bug in console Tom Tromey
@ 2000-12-08 12:05 ` Fernando Nasser
0 siblings, 0 replies; 2+ messages in thread
From: Fernando Nasser @ 2000-12-08 12:05 UTC (permalink / raw)
To: tromey; +Cc: Insight List
Tom Tromey wrote:
>
> 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?
>
Sure. Thanks.
Fernando
> 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
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-08 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-08 9:48 Patch: fix for new bug in console Tom Tromey
2000-12-08 12:05 ` Fernando Nasser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).