mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 18:59:21 +02:00
codetools: fixed InsertAllNewUnitsToMainUsesSection, issue #40522
(cherry picked from commit 00e6d8fbd8
)
This commit is contained in:
parent
d76ba3ddc8
commit
25013f7e7c
@ -8281,19 +8281,9 @@ begin
|
|||||||
repeat
|
repeat
|
||||||
ReadNextAtom; // read name
|
ReadNextAtom; // read name
|
||||||
if AtomIsChar(';') then break;
|
if AtomIsChar(';') then break;
|
||||||
CurUnitName:=ExtractUsedUnitNameAtCursor();
|
CurUnitName:=ExtractUsedUnitNameAtCursor(); // moves cursor behind used unit and InFilename
|
||||||
RemoveNewMainUsesSectionUnit(PChar(CurUnitName));
|
RemoveNewMainUsesSectionUnit(PChar(CurUnitName));
|
||||||
if fNewMainUsesSectionUnits.Count=0 then exit;
|
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 AtomIsChar(';') then break;
|
||||||
if not AtomIsChar(',') then break;
|
if not AtomIsChar(',') then break;
|
||||||
until (CurPos.StartPos>SrcLen);
|
until (CurPos.StartPos>SrcLen);
|
||||||
|
Loading…
Reference in New Issue
Block a user