mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:59:08 +02:00
SynEdit: Fix AvlTree node by LeftSum. Issue #0023889
git-svn-id: trunk@40325 -
This commit is contained in:
parent
c93d086331
commit
3d7f444396
@ -2577,12 +2577,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
ALeftSum := ALeftSum - Result.FLeftSizeSum;
|
ALeftSum := ALeftSum - Result.FLeftSizeSum;
|
||||||
|
aSizesBeforeSum := aSizesBeforeSum + Result.FLeftSizeSum;
|
||||||
if ALeftSum < Result.FSize then begin
|
if ALeftSum < Result.FSize then begin
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
ALeftSum := ALeftSum - Result.FSize;
|
ALeftSum := ALeftSum - Result.FSize;
|
||||||
aSizesBeforeSum := aSizesBeforeSum + Result.FLeftSizeSum + Result.FSize;
|
aSizesBeforeSum := aSizesBeforeSum + Result.FSize;
|
||||||
Result := Result.FRight;
|
Result := Result.FRight;
|
||||||
aStartPosition := aStartPosition + Result.FPositionOffset;
|
aStartPosition := aStartPosition + Result.FPositionOffset;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user