src/Tools/jEdit/src/isabelle.scala
changeset 63477 f5c81436b930
parent 63455 019856db2bb6
child 63484 2033a3960c36
--- a/src/Tools/jEdit/src/isabelle.scala	Wed Jul 13 19:02:23 2016 +0200
+++ b/src/Tools/jEdit/src/isabelle.scala	Wed Jul 13 19:04:49 2016 +0200
@@ -282,9 +282,10 @@
             val (tokens1, context1) = line_content(line_range.start, caret, context0)
             val (tokens2, _) = line_content(caret, line_range.stop, context1)
 
-            if (tokens1.nonEmpty && tokens1.head.is_command) buffer.indentLine(line, true)
+            if (tokens1.nonEmpty && tokens1.head.is_begin_or_command)
+              buffer.indentLine(line, true)
 
-            if (tokens2.isEmpty || tokens2.head.is_command)
+            if (tokens2.isEmpty || tokens2.head.is_begin_or_command)
               JEdit_Lib.buffer_edit(buffer) {
                 text_area.setSelectedText("\n")
                 if (!buffer.indentLine(line + 1, true)) text_area.goToStartOfWhiteSpace(false)