mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 20:30:41 +02:00
codetools: auto indenter: fixed endless loop on pasting new section, bug #15030
git-svn-id: trunk@22864 -
This commit is contained in:
parent
35cb7923c6
commit
5e40787741
@ -305,7 +305,7 @@ type
|
||||
public
|
||||
Stack: PBlock;
|
||||
Capacity: integer;
|
||||
Top: integer;
|
||||
Top: integer; // -1 = empty, 0 = 1 item
|
||||
TopType: TFABBlockType;
|
||||
LastBlockClosed: TBlock;
|
||||
LastBlockClosedAt: integer;
|
||||
@ -1270,8 +1270,8 @@ function TFullyAutomaticBeautifier.FindStackPosForBlockCloseAtPos(
|
||||
|
||||
procedure EndBigSection;
|
||||
begin
|
||||
while Stack.Top>=0 do
|
||||
EndBlock;
|
||||
if Stack.Top>=0 then
|
||||
EndBlock(Stack.Top+1);
|
||||
end;
|
||||
|
||||
procedure EndTopMostBlock(BlockTyp: TFABBlockType);
|
||||
@ -1603,7 +1603,8 @@ begin
|
||||
{$IFDEF VerboseIndenter}
|
||||
DebugLn(['TFullyAutomaticBeautifier.GetIndent parsed code in front: no context']);
|
||||
{$ENDIF}
|
||||
GetDefaultSrcIndent(Source,CleanPos,NewNestedComments,Indent);
|
||||
Indent.Indent:=0;
|
||||
Indent.IndentValid:=true;
|
||||
exit(Indent.IndentValid);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user