avoid compound edit: it causes confusion about the context of the last line, e.g. final "end";
authorwenzelm
Mon, 21 Aug 2017 15:23:04 +0200
changeset 66469 a6ec0172211a
parent 66468 075c2aadd0b8
child 66470 33aa9abd71cb
avoid compound edit: it causes confusion about the context of the last line, e.g. final "end";
src/Tools/jEdit/src/isabelle.scala
--- a/src/Tools/jEdit/src/isabelle.scala	Mon Aug 21 11:36:34 2017 +0200
+++ b/src/Tools/jEdit/src/isabelle.scala	Mon Aug 21 15:23:04 2017 +0200
@@ -290,11 +290,10 @@
             if (toks1.isEmpty) buffer.removeTrailingWhiteSpace(Array(line))
             else if (keywords.is_indent_command(toks1.head)) buffer.indentLine(line, true)
 
-            if (toks2.isEmpty || keywords.is_indent_command(toks2.head))
-              JEdit_Lib.buffer_edit(buffer) {
-                text_area.setSelectedText("\n")
-                if (!buffer.indentLine(line + 1, true)) text_area.goToStartOfWhiteSpace(false)
-              }
+            if (toks2.isEmpty || keywords.is_indent_command(toks2.head)) {
+              text_area.setSelectedText("\n")
+              if (!buffer.indentLine(line + 1, true)) text_area.goToStartOfWhiteSpace(false)
+            }
             else nl
           case None => nl
         }