SynEdit: A few debugln instructions for a range exception (conditional compiled only)

git-svn-id: trunk@18265 -
This commit is contained in:
martin 2009-01-12 23:20:18 +00:00
parent 14675021da
commit 18268c8784

View File

@ -3284,6 +3284,24 @@ var
// Initialize highlighter with line text and range info. It is
// necessary because we probably did not scan to the end of the last
// line - the internal highlighter range might be wrong.
{$IFDEF DEBUGSYNRANGE}
if (FFoldedLinesView.Ranges[CurLine] = nil) or
(FFoldedLinesView.Ranges[CurLine] = NullRange) then begin
debugln(['>>>> SynEdit Highlight-Ranges Error <<<< ',
' AClip =', dbgs(AClip),
' FirstLine=', FirstLine,' LastLine=',Lastline,
' CurLine=',CurLine,
' FirstCol=',FirstCol, ' LastCol=',LastCol,
' CanvasRect=',dbgs(Canvas.ClipRect)]);
debugln([' Topline=', FTopLine, ' LineCount=', FLines.Count,
' FoldedTopLine=', FFoldedLinesView.TopLine,
' foldedCount=', FFoldedLinesView.Count,
' TextHeight=', FTextHeight,
' Range=', PtrInt(FFoldedLinesView.Ranges[CurLine])
]);
DrawHiLightMarkupToken(nil, PChar(Pointer(sLine)), Length(sLine));
end else begin
{$ENDIF}
fHighlighter.SetRange(FFoldedLinesView.Ranges[CurLine]); //mh 2000-10-10
fHighlighter.SetLine(sLine, FFoldedLinesView.TextIndex[CurLine]);
// Try to concatenate as many tokens as possible to minimize the count
@ -3301,6 +3319,9 @@ var
// Let the highlighter scan the next token.
fHighlighter.Next;
end;
{$IFDEF DEBUGSYNRANGE}
end;
{$ENDIF}
end;
// Draw anything that's left in the TokenAccu record. Fill to the end
// of the invalid area with the correct colors.