That's getting closer.

If I write one decorator at (start, length) = (0, n > 0),
it works.

But for some Perl code, I get two messages complaining about
code on line 1, and end up trying to write two identical
decorators at the same location, of the same length,
this fails when they both start at col 0.

Sample code:
=============
#perl
@ & $ x++
# comment
=============

This code triggers two error messages at line 2, and the coloring shows
up as expected.  But if I delete the first line to produce this code:

==============
@ & $ x++
# comment
=============

I see from the logs that I'm drawing a decorator twice at pos 0,
length=9, but no indicator appears.

- Eric

Neil Hodgson wrote:
Eric Promislow:

I've narrowed down the problem to RunStyles::SplitRun. If posRun and position both == 0, then no insertion is made. Back in DecorationList::FillRange(), the test current->Empty() succeeds because the current indicator isn't associated with more
than one segment (run range), so the indicator is deleted.

  The problem was that FillRange was assuming that if it called
SplitRun then a new run would be created but that isn't the case if
there is already a run start at that position as there is at position
0. So changed the code to only call SplitRun and increment runEnd if
there is a need. This appears to have fixed the problem. Committed to
CVS. Diff looks like this:

    } else {
-        runStart = SplitRun(position);
-        runEnd++;
+        if (starts->PositionFromPartition(runStart) < position) {
+            runStart = SplitRun(position);
+            runEnd++;
+        }
    }

  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