Merge branch 'CodeTools/Examples/AddClass' into 'main'

CodeTools: Fixing compilation of the addclass.lpi example (continued 2f643bd4)

See merge request freepascal.org/lazarus/lazarus!318
This commit is contained in:
Mattias Gaertner 2024-08-18 09:23:38 +00:00
commit 98b800100f

View File

@ -57,7 +57,7 @@ begin
end;
SourceChangeCache:=CodeToolBoss.SourceChangeCache;
// find a nice insert position (behind the uses section)
UsesSection:=Tool.FindMainUsesSection(false);
UsesSection:=Tool.FindMainUsesNode(false);
InsertPos:=UsesSection.EndPos;
// use the same indentation as the start of the uses section
Indent:=GetLineIndent(Tool.Src,UsesSection.StartPos);