mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 17:59:54 +02:00
SynEdit: Wrapped-view, fix inserting lines
(cherry picked from commit bbee19f531
)
This commit is contained in:
parent
b81824c552
commit
c01af285f4
@ -876,20 +876,15 @@ var
|
||||
CurrentPage: TSynEditLineMapPageHolder;
|
||||
begin
|
||||
CurrentPage := FindPageForLine(ALineIdx, afmPrev);
|
||||
if not CurrentPage.HasPage then begin
|
||||
CurrentPage := FirstPage;
|
||||
if not CurrentPage.HasPage then begin
|
||||
CurrentPage := FindPageForLine(ALineIdx, afmCreate);
|
||||
if not CurrentPage.HasPage then
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
// inherited => moves any node with FStartLine >= AStartLine
|
||||
inherited AdjustForLinesInserted(ALineIdx, ALineCount);
|
||||
|
||||
// TODO ::::XXXXX ONLY if inside the page / otherwise call invalidate
|
||||
CurrentPage.AdjustForLinesInserted(ALineIdx, ALineCount, ABytePos);
|
||||
// CurrentPage.StartLine is still the old value
|
||||
if CurrentPage.HasPage then
|
||||
CurrentPage.AdjustForLinesInserted(ALineIdx, ALineCount, ABytePos)
|
||||
else
|
||||
InvalidateLines(ALineIdx, ALineIdx+ALineCount-1);
|
||||
end;
|
||||
|
||||
procedure TSynLineMapAVLTree.AdjustForLinesDeleted(AStartLine, ALineCount,
|
||||
|
Loading…
Reference in New Issue
Block a user