sub search_nav_bot {
my ($mset, $q) = @_;
my $total = $mset->get_matches_estimated;
- my $nr = scalar $mset->items;
my $o = $q->{o};
- my $end = $o + $nr;
+ my $end = $o + $mset->size;
my $beg = $o + 1;
my $rv = '</pre><hr><pre id=t>';
if ($beg <= $end) {
my $r = $q->{r};
my $rootset = PublicInbox::SearchThread::thread($msgs,
$r ? sort_relevance(\%pct) : *PublicInbox::View::sort_ds,
- $srch);
+ $ctx);
my $skel = search_nav_bot($mset, $q). "<pre>";
my $inbox = $ctx->{-inbox};
$ctx->{-upfx} = '';