From 3b273a7ab23bbcd2ce3c62bc16960e46d5559614 Mon Sep 17 00:00:00 2001 From: IChooseYou Date: Thu, 5 Mar 2026 06:02:43 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20don't=20skip=20Array=20in=20scope=20widt?= =?UTF-8?q?h=20calc=20=E2=80=94=20only=20skip=20Struct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Array headers like int32_t[10] render in the type column and need their width accounted for. Only Struct (pointer headers) should be excluded from inflating sibling column widths. --- src/compose.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compose.cpp b/src/compose.cpp index 384367a..b83d3c9 100644 --- a/src/compose.cpp +++ b/src/compose.cpp @@ -1050,8 +1050,8 @@ ComposeResult compose(const NodeTree& tree, const Provider& prov, uint64_t viewR for (int childIdx : state.childMap.value(container.id)) { const Node& child = tree.nodes[childIdx]; - // Skip struct/array children — pointer headers shouldn't inflate sibling widths - if (child.kind == NodeKind::Struct || child.kind == NodeKind::Array) + // Skip struct children — pointer headers shouldn't inflate sibling widths + if (child.kind == NodeKind::Struct) continue; scopeMaxType = qMax(scopeMaxType, (int)nodeTypeName(child).size()); @@ -1085,8 +1085,8 @@ ComposeResult compose(const NodeTree& tree, const Provider& prov, uint64_t viewR int rootMaxName = kMinNameW; for (int childIdx : state.childMap.value(0)) { const Node& child = tree.nodes[childIdx]; - // Skip struct/array children — pointer headers shouldn't inflate sibling widths - if (child.kind == NodeKind::Struct || child.kind == NodeKind::Array) + // Skip struct children — pointer headers shouldn't inflate sibling widths + if (child.kind == NodeKind::Struct) continue; rootMaxType = qMax(rootMaxType, (int)nodeTypeName(child).size());