SourceEditor: Fix dealing with out-of-range debug-marks

git-svn-id: trunk@25266 -
This commit is contained in:
martin 2010-05-08 23:29:54 +00:00
parent 08351d67d5
commit 098c7826d1

View File

@ -235,6 +235,10 @@ begin
FDebugMarkInfo.IncRefCount;
end;
if ALastLinePos >= FDebugMarkInfo.Count then begin
debugln(['Request to set debug-mark out of range: max-count=',FDebugMarkInfo.Count,' Marks=',AFirstLinePos,' to=',ALastLinePos]);
ALastLinePos := FDebugMarkInfo.Count -1;
end;
for i := AFirstLinePos - 1 to ALastLinePos - 1 do
FDebugMarkInfo[i] := i + 1;
TSynEdit(SynEdit).InvalidateGutter;