avoid trailing spaces;
authorwenzelm
Fri, 23 Jun 2017 14:21:16 +0200
changeset 66174 8903653fc22e
parent 66173 6c71a3af85a3
child 66175 09fe6ae94331
avoid trailing spaces;
src/Tools/jEdit/src/isabelle.scala
--- a/src/Tools/jEdit/src/isabelle.scala	Fri Jun 23 11:55:33 2017 +0200
+++ b/src/Tools/jEdit/src/isabelle.scala	Fri Jun 23 14:21:16 2017 +0200
@@ -263,8 +263,8 @@
             val caret = text_area.getCaretPosition
             val (toks1, toks2) = Text_Structure.split_line_content(buffer, keywords, line, caret)
 
-            if (toks1.nonEmpty && keywords.is_indent_command(toks1.head))
-              buffer.indentLine(line, true)
+            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) {