+2

Tcl if/else does not reindent properly

Jeremy Cowgar 13 years ago updated 13 years ago 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"

    }