From ea052b646d11f2070572b9fa027c1940c43a4c3d Mon Sep 17 00:00:00 2001 From: juha Date: Sun, 14 Aug 2011 09:09:57 +0000 Subject: [PATCH] Codetools: Improve class code beautifier, patch from Anton. git-svn-id: trunk@31984 - --- components/codetools/codebeautifier.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/codetools/codebeautifier.pas b/components/codetools/codebeautifier.pas index 307aa62f9a..8ac4edbe23 100644 --- a/components/codetools/codebeautifier.pas +++ b/components/codetools/codebeautifier.pas @@ -693,7 +693,7 @@ var procedure StartProcedure(Typ: TFABBlockType); begin - if Stack.TopType<>bbtDefinition then + if not (Stack.TopType in [bbtDefinition,bbtClassSection]) then EndIdentifierSectionAndProc; if Stack.TopType in (bbtAllCodeSections+bbtAllProcedures+[bbtNone,bbtDefinition,bbtClassSection]) then begin @@ -727,8 +727,11 @@ var if Stack.TopType=bbtProcedureHead then EndBlock; if (Stack.TopType in bbtAllProcedures) and (not IsProcedureImplementation) - then + then begin EndBlock; + if Stack.TopType=bbtDefinition then + EndBlock; + end; end; function CheckProcedureModifiers: boolean;