neomutt / neomutt

✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat
https://neomutt.org/
GNU General Public License v2.0
3.27k stars 308 forks source link

Pager mini-index is messed up when new message arrives #4453

Open nobrowser opened 2 days ago

nobrowser commented 2 days ago

NeoMutt Version

NeoMutt 20240425

... but it has been this way as long as I can remember. It just reached that point in annoy level, right now.

Expected Behaviour

I use the pager_index_lines variable to see a mini-index while I read a message. It helps me a lot to keep the context while I focus on one particular message. To be precise, I set this variable to 7. My expectation would be that the mini-index window either stays centered on the message I'm reading, or else responds to my explicit actions (including moving to read another message), and this regardless of what else happens to the mailbox.

Actual Behaviour

When I open and start reading a message, the selected / highlighted line in the mini-index indeed corresponds to that message, and is centered. But when a new message arrives while I'm reading, things get weird. The selection in the mini-index changes, and changes in a seemingly random way; the new selection often is not the newly arrived message. With my developer hat on, I'm guessing that neomutt keeps the selection as the integer index in the mailbox and selects the line at the same index after the new arrival ... but that may not be the same message anymore.

I thought that it might have something to do with my sort and sort_aux options, but they are dog standard (pardon me, mutt standard).

set sort=last-date
set sort_aux=date
set use_threads="threads"

Steps to Reproduce

I think the above covers it.

How often does this happen?

Almost always in the above scenario.

When did it start to happen?

As I said, it has always been like this, I think.

Extra Info

gahr commented 2 days ago

I can't immediately reproduce it. My mini-pager stays sane when a new message arrives. Can you please try with the latest version?