From a0242dc95da8b9d83a6a88272cfb7c973b158b73 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Thu, 24 Oct 2024 14:25:04 -0400 Subject: Fix alignment of top level braces in PseudoC --- lang/c/pseudoc.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lang/c/pseudoc.cpp') diff --git a/lang/c/pseudoc.cpp b/lang/c/pseudoc.cpp index 2a1ac3a9..8de510a7 100644 --- a/lang/c/pseudoc.cpp +++ b/lang/c/pseudoc.cpp @@ -31,6 +31,7 @@ void PseudoCFunction::BeginLines(const HighLevelILInstruction& instr, HighLevelI if (instr.exprIndex == m_highLevelIL->GetRootExpr().exprIndex) { // At top level, add braces around the entire function + tokens.PrependCollapseIndicator(); tokens.AppendOpenBrace(); tokens.NewLine(); tokens.IncreaseIndent(); @@ -45,6 +46,7 @@ void PseudoCFunction::EndLines(const HighLevelILInstruction& instr, HighLevelILT // At top level, add braces around the entire function tokens.NewLine(); tokens.DecreaseIndent(); + tokens.PrependCollapseIndicator(); tokens.AppendCloseBrace(); } } @@ -813,6 +815,7 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H if (function->IsInstructionCollapsed(instr, 1)) { tokens.Append(CollapsedInformationToken, " {...}"); + tokens.NewLine(); } else { -- cgit v1.3.1