If the mailbox doesn't have a full view of messages then jumping still uses the full height, it should use the minimum of the height and the number of messages.
While my patch seems to fix something, I think there is still an issue. To reproduce (example with two accounts):
- View a message from the first account
- run:term lswhile viewing the message
- view quickly switches to the term for ls but it finishes and is back on the message view, all good so far
- close the message viewer and get returned to account #2 which is not where the history should take us
I'll try and take a look at this and see if I can find what's going on
I have a case which should reproduce a similar issue, though am not sure if it is the exact one you've experienced:
in any aerc view run:term sleep 3
a new tab is created to run the command
change to another tab before the sleep completes (not the tab that the command was run from)
let the command finish in its own time and the history will be popped, leading to a change of tab.
I've submitted a patch for this here: https://lists.sr.ht/~sircmpwn/aerc/%3C20191008173040.757012-1-dev%40jeffas.io%3E
I believe that support would need to be added in go-libvterm (https://github.com/ddevault/go-libvterm)
Hopefully this patch fixes this, seems to on my end. https://lists.sr.ht/~sircmpwn/aerc/%3C20191001170148.40696-1-dev%40jeffas.io%3E
When viewing a sent folder it normally makes little sense to show who the message is from and would be useful to have this automatically switched toto.
What backend are you using by chance?