From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.3 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C3D611F8B2 for ; Wed, 19 Aug 2015 19:32:02 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] view: fix spacing on missing ghosts Date: Wed, 19 Aug 2015 19:32:02 +0000 Message-Id: <1440012722-19642-1-git-send-email-e@80x24.org> List-Id: We must not prematurely indent if we have no message header to display. --- lib/PublicInbox/View.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index fd75365..5aab609 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -495,11 +495,11 @@ sub anchor_for { sub simple_dump { my ($dst, $root, $node, $level) = @_; # $root = [ Root Message-ID, \%seen, $srch ]; - my $pfx = ' ' x $level; - $$dst .= $pfx; if (my $x = $node->message) { my $mid = $x->header('Message-ID'); if ($root->[0] ne $mid) { + my $pfx = ' ' x $level; + $$dst .= $pfx; my $s = $x->header('Subject'); my $h = $root->[2]->subject_path($s); if ($root->[1]->{$h}) { -- EW