mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-26 21:09:12 +02:00
codetools: fixed inserting first published variable
git-svn-id: trunk@29365 -
This commit is contained in:
parent
bec76993b1
commit
2fa1d11c5c
@ -5859,6 +5859,7 @@ begin
|
||||
end;
|
||||
end else begin
|
||||
// insert as first variable/proc
|
||||
//debugln(['TCodeCompletionCodeTool.InsertNewClassParts ',ClassSectionNode.DescAsString,' ',dbgstr(copy(Src,ClassSectionNode.StartPos,ClassSectionNode.EndPos-ClassSectionNode.StartPos))]);
|
||||
Indent:=GetLineIndent(Src,ClassSectionNode.StartPos)
|
||||
+ASourceChangeCache.BeautifyCodeOptions.Indent;
|
||||
InsertPos:=ClassSectionNode.StartPos;
|
||||
@ -5867,7 +5868,10 @@ begin
|
||||
then begin
|
||||
// the first published section has no keyword
|
||||
if ClassSectionNode.NextBrother<>nil then
|
||||
Indent:=GetLineIndent(Src,ClassSectionNode.StartPos)
|
||||
Indent:=GetLineIndent(Src,ClassSectionNode.NextBrother.StartPos)
|
||||
+ASourceChangeCache.BeautifyCodeOptions.Indent
|
||||
else
|
||||
Indent:=GetLineIndent(Src,ClassSectionNode.Parent.StartPos)
|
||||
+ASourceChangeCache.BeautifyCodeOptions.Indent;
|
||||
end else if (ClassSectionNode.Desc in (AllClassBaseSections+[ctnClassType]))
|
||||
then begin
|
||||
|
@ -3727,7 +3727,6 @@ begin
|
||||
// start the first class section (always published)
|
||||
CreateChildNode;
|
||||
CurNode.Desc:=ctnClassPublished;
|
||||
CurNode.StartPos:=CurPos.EndPos; // behind 'class' including the space
|
||||
if CurPos.Flag=cafEdgedBracketOpen then
|
||||
ReadGUID;
|
||||
// parse till "end" of class/object
|
||||
|
Loading…
Reference in New Issue
Block a user