The HTML generated for the Atom feed doesn't have the footer
of /T/ and /t/ HTML-only views, so just make "changed" in
the diffstat go directly to the permalink #related anchor.
Fixes: 66512e177390 ("view: generate query in single-message and commit views")
 
        # scan through all parts, looking for displayable text
        $ctx->{mhref} = $mhref;
-       $ctx->{end_id} = "e$id";
+       $ctx->{changed_href} = "#e$id"; # for diffstat "files? changed,"
        $ctx->{obuf} = \$rv;
        $eml->each_part(\&add_text_body, $ctx, 1);
        delete $ctx->{obuf};
 
                        $$dst .= $linkify->to_html($l);
                }
                $$dst .= $x[2]; # $3 /^ \d+ files? /
-               my $end = $ctx->{end_id} // 'related';
-               $$dst .= "<a href=#$end>changed</a>,";
+               my $ch = $ctx->{changed_href} // '#related';
+               $$dst .= qq(<a href="$ch">changed</a>,);
                $$dst .= ascii_html($x[1]); # $4: insertions/deletions
                $$dst .= $linkify->to_html($x[0]); # notes, commit message, etc
        } else {
 
                qq(<pre\nstyle="white-space:pre-wrap">);
        $ctx->{obuf} = \$s;
        $ctx->{mhref} = $href;
+       $ctx->{changed_href} = "${href}#related";
        PublicInbox::View::multipart_text_as_html($eml, $ctx);
        delete $ctx->{obuf};
        $s .= '</pre></div></content></entry>';