From 25013f7e7c2030f7b14e7e44371fba3960a6f528 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 25 Sep 2023 22:13:53 +0200 Subject: [PATCH] codetools: fixed InsertAllNewUnitsToMainUsesSection, issue #40522 (cherry picked from commit 00e6d8fbd84ca0b4502513cfc5a9d65bde9dec1b) --- components/codetools/codecompletiontool.pas | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/components/codetools/codecompletiontool.pas b/components/codetools/codecompletiontool.pas index 639db00a79..6d451b820b 100644 --- a/components/codetools/codecompletiontool.pas +++ b/components/codetools/codecompletiontool.pas @@ -8281,19 +8281,9 @@ begin repeat ReadNextAtom; // read name if AtomIsChar(';') then break; - CurUnitName:=ExtractUsedUnitNameAtCursor(); + CurUnitName:=ExtractUsedUnitNameAtCursor(); // moves cursor behind used unit and InFilename RemoveNewMainUsesSectionUnit(PChar(CurUnitName)); if fNewMainUsesSectionUnits.Count=0 then exit; - ReadNextAtom; - while AtomIsChar('.') do - begin - ReadNextAtom; - ReadNextAtom; - end; - if UpAtomIs('IN') then begin - ReadNextAtom; - ReadNextAtom; - end; if AtomIsChar(';') then break; if not AtomIsChar(',') then break; until (CurPos.StartPos>SrcLen);