[GRASS-dev] gis.m: last line duplicated in the Output panel

Huidae Cho grass4u at gmail.com
Mon May 14 22:29:49 EDT 2007

When running "any" commands from gis.m, I get duplicated last lines in
the Output window.  In lib/gtcltk/gronsole.tcl,

proc Gronsole::readout {path ci mark fh} {

        set lines {}

        while {[gets $fh line] >= 0} {
                lappend lines $line

        if {[llength $lines] != 0} {
                Gronsole::add_data_tag $path $ci out
        foreach line $lines {
                Gronsole::output_to_gronsole $path $mark $ci [list cmd$ci cmd$ci-out] "$line\n"
        set last [lindex $lines end]
        if {$last != {}} {
                Gronsole::output_to_gronsole $path $mark $ci [list cmd$ci cmd$ci-out] $last

The above if clause unnecessarily outputs the last line *again* after all the
output is sent to gronsole.  Do we need to omit the newline from the last line?

Huidae Cho

More information about the grass-dev mailing list