scala-ide / scala-worksheet

A Scala IDE plugin for a multi-line REPL (called worksheet)
96 stars 24 forks source link

Wrong indentation #68

Closed dotta closed 12 years ago

dotta commented 12 years ago

The cursor is set at the wrong position if enter is pressed inside the brackets in this.synchronized.

object Foo {
 (0 to 1) foreach { i =>
   println(i)
   this.synchronized{ /*place the cursor here and press enter*/ }                            //> 0
                                                                                             //| 1
 }
}

Will produce

object Foo {
 (0 to 1) foreach { i =>
   println(i)
   this.synchronized{                                                      //> 0
   }
| <- cursor will be here                                                   //| 1
 }
}
dotta commented 12 years ago

Luc, can you have a look at it (when you have time, of course, this is not at all critical)

dotta commented 12 years ago

Maybe this is not worth fixing if we decide to work on #70.