mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 04:12:34 +02:00
SynEdit: fixed wrong index in space trimmer. Issue #0025843
git-svn-id: trunk@44397 -
This commit is contained in:
parent
bbcdb509b3
commit
20b4a3d0ed
@ -280,11 +280,11 @@ procedure TSynEditTrimSpaceList.Delete(AEntryIdx: Integer);
|
||||
begin
|
||||
Assert((AEntryIdx >= 0) and (AEntryIdx < FCount), 'TSynEditTrimSpaceList.Delete index');
|
||||
Entries[AEntryIdx].TrimmedSpaces := '';
|
||||
dec(FCount);
|
||||
if AEntryIdx < FCount then begin
|
||||
Move(Entries[AEntryIdx+1], Entries[AEntryIdx], (FCount-AEntryIdx)*SizeOf(Entries[0]));
|
||||
Pointer(Entries[FCount-1].TrimmedSpaces) := nil;
|
||||
Pointer(Entries[FCount].TrimmedSpaces) := nil;
|
||||
end;
|
||||
dec(FCount);
|
||||
end;
|
||||
|
||||
function TSynEditTrimSpaceList.IndexOf(ALineIdx: Integer): Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user