SynEdit: Wrapped-view, clean up empty nodes

This commit is contained in:
Martin 2025-01-24 10:25:13 +01:00
parent e331c9fb35
commit a949f2be2e

View File

@ -1149,9 +1149,13 @@ var
dummy, NextLineOffs, PrevLineOffs, NextLineDist, PrevLineDist, c: Integer; dummy, NextLineOffs, PrevLineOffs, NextLineDist, PrevLineDist, c: Integer;
NextPage, PrevPage: TSynEditLineMapPage; NextPage, PrevPage: TSynEditLineMapPage;
begin begin
if (FSynWordWrapLineMap.FirstInvalidLine < 0) and if (FSynWordWrapLineMap.FirstInvalidLine >= 0) then
(RealCount <= Tree.PageJoinSize) exit;
then begin if (RealCount = 0) and (FSize = 0) then begin
Tree.FreeNode(Self);
end
else
if (RealCount <= Tree.PageJoinSize) then begin
NextLineOffs := 0; NextLineOffs := 0;
dummy := 0; dummy := 0;
NextPage := Successor(NextLineOffs, dummy); NextPage := Successor(NextLineOffs, dummy);