Skip to content

Commit bdb1d17

Browse files
committed
tooledit.tcl suppress leading/trailing whitespace
1 parent f354dbd commit bdb1d17

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tcl/tooledit.tcl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ proc ::tooledit::writefile {filename} {
802802
set allheader [concat $::te(autocolumns) $::te(allcolumns) comment]
803803
804804
foreach i $::te(items) {
805+
set line ""
805806
foreach h $allheader {
806807
set j ""
807808
set w $::te($h,width)
@@ -812,10 +813,10 @@ proc ::tooledit::writefile {filename} {
812813
}
813814
set value [string trim $::te(parm,$i,$h)]
814815
if {"$value" != ""} {
815-
puts -nonewline $fd "$::te($h,tag)$value "
816+
set line "$line $::te($h,tag)$value "
816817
}
817818
}
818-
puts $fd "" ;# new line
819+
puts $fd [string trim "$line"]
819820
}
820821
watch stop
821822
close $fd

0 commit comments

Comments
 (0)