It doesn't make sense to try to preserve the pager position when
toggling headers: the purpose of toggling headers is to see the
headers in full or weeded state. So, reset the position back to the
top.
if (IsHeader (extra))
{
Context->msgnotreadyet = -1;
- if (rc == -1)
- OldHdr = NULL;
- else
+ switch (rc)
{
- TopLine = topline;
- OldHdr = extra->hdr;
+ case -1:
+ case OP_DISPLAY_HEADERS:
+ mutt_clear_pager_position ();
+ break;
+ default:
+ TopLine = topline;
+ OldHdr = extra->hdr;
+ break;
}
}