Skip to content
  • Kevin J. McCarthy's avatar
    Clear pager position upon returning to the index menu. · 30c913c7
    Kevin J. McCarthy authored
    This fixes a bug where opening a message sometimes shows it scrolled
    down.
    
    The easiest way to trigger this is to open a long message in a mailbox
    with no new messages, scroll down, hit <next-new-then-unread> and then
    reopen the message.  The pager will "remember" the position and scroll
    down.  If you simply exit the message and re-enter it, the position is
    not saved.
    
    More annoyingly, once in a very great while I will open a new message
    and have the message scrolled down partway.  I believe this is due to
    OldHdr happening to point to the same address as the Header of the new
    message.
    
    This is somewhat easily triggered on a mailbox with one message, which
    you open, scroll down in, hit <next-new-then-unread> to exit, and then
    delete/sync.  In another mutt instance, copy the same messsage back to
    the mailbox, then open the message in the original mutt instance.  At
    least some of the time, the OldHdr pointer matches the new message,
    and so it opens scrolled down.
    
    This patch solves the problem by clearing the pager position once all
    redirections through the index menu are done.
    30c913c7