+2

Tcl if/else does not reindent properly

Jeremy Cowgar 12 aastat tagasi uuendatud 12 aastat tagasi 0

The code block (in the midst of more advanced code or not) does not indent properly using the reindent feature:

if { 1 } {

    puts "Hello"
} else {
    puts "Goodbye"
}

The reindent option ignores the outdent on the } else { line. It indents to:

if { 1 } {

    puts "Hello"

    } else {

        puts "Goodbye"

    }