tuned;
authorwenzelm
Mon, 04 Dec 2017 16:28:06 +0100
changeset 67126 143f0ba01415
parent 67125 361b3ef643a7
child 67127 cf111622c9f8
tuned;
src/Tools/jEdit/src/token_markup.scala
--- a/src/Tools/jEdit/src/token_markup.scala	Mon Dec 04 16:28:00 2017 +0100
+++ b/src/Tools/jEdit/src/token_markup.scala	Mon Dec 04 16:28:06 2017 +0100
@@ -271,10 +271,9 @@
         var offset = 0
         for ((style, token) <- styled_tokens) {
           val length = token.length
-          val end_offset = offset + length
-          if ((offset until end_offset) exists
-              (i => extended.isDefinedAt(i) || line.charAt(i) == '\t')) {
-            for (i <- offset until end_offset) {
+          val offsets = offset until (offset + length)
+          if (offsets.exists(i => extended.isDefinedAt(i) || line.charAt(i) == '\t')) {
+            for (i <- offsets) {
               val style1 =
                 extended.get(i) match {
                   case None => style