mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-23 01:28:31 +02:00
SourceEditor: Fix dealing with out-of-range debug-marks
git-svn-id: trunk@25283 -
This commit is contained in:
parent
ba597ac63e
commit
432b5fc9dd
@ -235,9 +235,13 @@ begin
|
|||||||
FDebugMarkInfo.IncRefCount;
|
FDebugMarkInfo.IncRefCount;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ALastLinePos >= FDebugMarkInfo.Count then begin
|
if ALastLinePos > FDebugMarkInfo.Count then begin
|
||||||
debugln(['Request to set debug-mark out of range: max-count=',FDebugMarkInfo.Count,' Marks=',AFirstLinePos,' to=',ALastLinePos]);
|
debugln(['Request to set debug-mark out of range: max-count=',FDebugMarkInfo.Count,' Marks=',AFirstLinePos,' to=',ALastLinePos]);
|
||||||
ALastLinePos := FDebugMarkInfo.Count -1;
|
ALastLinePos := FDebugMarkInfo.Count;
|
||||||
|
end;
|
||||||
|
if AFirstLinePos < 1 then begin
|
||||||
|
debugln(['Request to set debug-mark out of range: max-count=',FDebugMarkInfo.Count,' Marks=',AFirstLinePos,' to=',ALastLinePos]);
|
||||||
|
AFirstLinePos := 1;
|
||||||
end;
|
end;
|
||||||
for i := AFirstLinePos - 1 to ALastLinePos - 1 do
|
for i := AFirstLinePos - 1 to ALastLinePos - 1 do
|
||||||
FDebugMarkInfo[i] := i + 1;
|
FDebugMarkInfo[i] := i + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user