- my $more = $ctx->{more};
- if ($nr == 1) {
- # $more cannot be true w/o $smsg being defined:
- $ctx->{mhref} = $more ? '../'.mid_href($ctx->{smsg}->{mid}).'/'
- : '';
- multipart_text_as_html(delete $ctx->{mime}, $ctx);
- ${delete $ctx->{obuf}} .= '</pre><hr>';
- } elsif ($more) {
- ++$ctx->{end_nr};
- # fake an EOF if {more} retrieval fails fails;
- eval { msg_page_more($ctx, $nr) };
- } elsif ($nr == $ctx->{end_nr}) {
+ if (my $more = delete $ctx->{more}) { # unlikely
+ # fake an EOF if $more retrieval fails;
+ eval { msg_page_more($ctx, $nr, @$more) };
+ } elsif (my $hdr = delete $ctx->{hdr}) {