mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 03:57:23 +01:00
SynEdit: speed up large operations (search replace)
git-svn-id: trunk@43763 -
This commit is contained in:
parent
a586b848df
commit
d57a4a302e
@ -1518,9 +1518,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynEditSelection.LineChanged(Sender: TSynEditStrings; AIndex, ACount: Integer);
|
procedure TSynEditSelection.LineChanged(Sender: TSynEditStrings; AIndex, ACount: Integer);
|
||||||
|
var
|
||||||
|
i, i2: Integer;
|
||||||
begin
|
begin
|
||||||
if (FCaret <> nil) and (not FCaret.AllowPastEOL) and (not FIsSettingText) then
|
if (FCaret <> nil) and (not FCaret.AllowPastEOL) and (not FIsSettingText) then begin
|
||||||
AdjustAfterTrimming;
|
i := ToPos(AIndex);
|
||||||
|
i2 := i + ACount - 1;
|
||||||
|
|
||||||
|
//AdjustAfterTrimming;
|
||||||
|
if (FStartLinePos >= i) and (FStartLinePos <= i2) then
|
||||||
|
if FStartBytePos > Length(FLines[FStartLinePos-1]) + 1 then
|
||||||
|
FStartBytePos := Length(FLines[FStartLinePos-1]) + 1;
|
||||||
|
if (FEndLinePos >= i) and (FEndLinePos <= i2) then
|
||||||
|
if FEndBytePos > Length(FLines[FEndLinePos-1]) + 1 then
|
||||||
|
FEndBytePos := Length(FLines[FEndLinePos-1]) + 1;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynEditSelection.DoLinesEdited(Sender: TSynEditStrings; aLinePos, aBytePos, aCount,
|
procedure TSynEditSelection.DoLinesEdited(Sender: TSynEditStrings; aLinePos, aBytePos, aCount,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user