This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: fix for new bug in console


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]