mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 03:37:59 +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;
|
||||
|
||||
procedure TSynEditSelection.LineChanged(Sender: TSynEditStrings; AIndex, ACount: Integer);
|
||||
var
|
||||
i, i2: Integer;
|
||||
begin
|
||||
if (FCaret <> nil) and (not FCaret.AllowPastEOL) and (not FIsSettingText) then
|
||||
AdjustAfterTrimming;
|
||||
if (FCaret <> nil) and (not FCaret.AllowPastEOL) and (not FIsSettingText) then begin
|
||||
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;
|
||||
|
||||
procedure TSynEditSelection.DoLinesEdited(Sender: TSynEditStrings; aLinePos, aBytePos, aCount,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user