This fixes it.

Thanks Neil,
Eric

Neil Hodgson wrote:
Eric Promislow:

There are two different errors both on line 2, which resolve to
start = 8, length 8

If I try to display both decorators (where both are decorator 15, set to a red
quiggle), the rest of the buffer is decorated.  As a workaround I'm only
displaying the first decorator at each starting position.

  What is occurring here is that it find the first position, 8, is
already value 1 so it increments this to second position (16) as this
should be in style 0 so should be switched but its the end of the
range so no change should be made. Fixed by changing the end of
RunStyles::FillRange to recognize this:

--- RunStyles.cxx    9 Jun 2007 01:07:26 -0000    1.5
+++ RunStyles.cxx    12 Jun 2007 03:08:48 -0000
@@ -138,14 +138,16 @@
            runEnd++;
        }
    }
-    styles->SetValueAt(runStart, value);
-    // Remove each old run over the range
-    for (int run=runStart+1; run<runEnd; run++) {
-        RemoveRun(runStart+1);
+    if (runStart < runEnd) {
+        styles->SetValueAt(runStart, value);
+        // Remove each old run over the range
+        for (int run=runStart+1; run<runEnd; run++) {
+            RemoveRun(runStart+1);
+        }
+        runEnd = RunFromPosition(end);
+        RemoveRunIfSameAsPrevious(runEnd);
+        RemoveRunIfSameAsPrevious(runStart);
    }
-    runEnd = RunFromPosition(end);
-    RemoveRunIfSameAsPrevious(runEnd);
-    RemoveRunIfSameAsPrevious(runStart);
    return true;
}

  Committed to CVS.

  Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to