From 7ce3a72ba5942686fce2bccc59a051044511f238 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 27 Mar 2017 20:49:17 +1100 Subject: Keep positions in Sci_Position variables so can adapt to changes. --- lexers/LexErrorList.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lexers/LexErrorList.cxx b/lexers/LexErrorList.cxx index 7aaf9a5ad..50e12469c 100644 --- a/lexers/LexErrorList.cxx +++ b/lexers/LexErrorList.cxx @@ -315,9 +315,9 @@ static void ColouriseErrorListLine( Sci_Position startValue = -1; int style = RecogniseErrorListLine(lineBuffer, lengthLine, startValue); if (escapeSequences && strstr(lineBuffer, CSI)) { - const int startPos = endPos - lengthLine; + const Sci_Position startPos = endPos - lengthLine; const char *linePortion = lineBuffer; - int startPortion = startPos; + Sci_Position startPortion = startPos; int portionStyle = style; while (const char *startSeq = strstr(linePortion, CSI)) { if (startSeq > linePortion) { @@ -326,7 +326,7 @@ static void ColouriseErrorListLine( const char *endSeq = startSeq + 2; while (!SequenceEnd(*endSeq)) endSeq++; - const int endSeqPosition = startPortion + static_cast(endSeq - linePortion) + 1; + const Sci_Position endSeqPosition = startPortion + (endSeq - linePortion) + 1; switch (*endSeq) { case 0: styler.ColourTo(endPos, SCE_ERR_ESCSEQ_UNKNOWN); -- cgit v1.2.3