Rework msglist scrolling

This changes the scrolling to be done on the draw, when the height is
updated, ensuring that the selected item is kept on screen during
resizing.

Also, this ensures that messages will fill the screen when resizing the
window, for instance, shrinking and then growing drags down more
messages if possible.

This is a transplant of the dirlist scrolling logic.
This commit is contained in:
Jeffas 2020-06-09 20:13:13 +01:00 committed by Reto Brunner
parent c6f4d7badd
commit 15b72df1da
7 changed files with 40 additions and 24 deletions
commands/msg

View file

@ -62,7 +62,7 @@ func (Move) Execute(aerc *widgets.Aerc, args []string) error {
aerc.RemoveTab(h.msgProvider)
}
store.Next()
acct.Messages().Scroll()
acct.Messages().Invalidate()
joinedArgs := strings.Join(args[optind:], " ")
store.Move(uids, joinedArgs, createParents, func(
msg types.WorkerMessage) {