ide: fixed delting EndOfTokenChars at end of code template, fixed #40498

This commit is contained in:
mattias 2023-12-19 10:38:35 +01:00
parent 3f6dc2d6ad
commit 0b4013a8fe

View File

@ -534,18 +534,6 @@ begin
// p must be logical, until template text is inserted
end;
// delete double end separator (e.g. avoid creating two semicolons 'begin end;;')
if (AEditor.BlockEnd.Y>0) and (AEditor.BlockEnd.Y<=AEditor.Lines.Count)
then begin
LineText:=AEditor.Lines[AEditor.BlockEnd.Y-1];
if AEditor.BlockEnd.X <= length(LineText) then
i := pos(LineText[AEditor.BlockEnd.X], EndOfTokenChr)
else
i := -1;
if i > 0 then
Parser.TrimEOTChar(EndOfTokenChr[i]);
end;
if Parser.EditCellList.Count > 0 then
i := AEditor.PluginCount - 1
else