mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:29:12 +02:00
SynEdit: Small optimization to the undo system
git-svn-id: trunk@20958 -
This commit is contained in:
parent
b38412dbee
commit
fae2c9912f
@ -704,7 +704,8 @@ begin
|
||||
StoreSpacesForLine(LogY - 1,
|
||||
copy(s,1, LogX - 1) + copy(s, LogX + ByteLen, length(s)),
|
||||
fSynStrings.Strings[LogY - 1]);
|
||||
UndoList.AddChange(TSynEditUndoTrimDelete.Create(LogX, LogY, Result));
|
||||
if Result <> '' then
|
||||
UndoList.AddChange(TSynEditUndoTrimDelete.Create(LogX, LogY, Result));
|
||||
end;
|
||||
|
||||
procedure TSynEditStringTrimmingList.EditMoveToTrim(LogY, Len: Integer);
|
||||
@ -820,7 +821,7 @@ begin
|
||||
Len := length(t);
|
||||
|
||||
IgnoreSendNotification(senrEditAction, True);
|
||||
// Delete uncommited spaces
|
||||
// Delete uncommited spaces (could laso be ByteLen too big, due to past EOL)
|
||||
if LogX + ByteLen > Len + 1 then begin
|
||||
if LogX > Len + 1 then
|
||||
ByteLen := ByteLen - (LogX - (Len + 1));
|
||||
|
Loading…
Reference in New Issue
Block a user