From 408a9e7b103e427db673c531b2a6f92fe8a26964 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 11 Jun 2019 10:08:44 -0400 Subject: [PATCH] Fix automatic scrolling when messages arrive/leave --- widgets/msglist.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/msglist.go b/widgets/msglist.go index 43c2ee4..ae50b0d 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -137,12 +137,12 @@ func (ml *MessageList) storeUpdate(store *lib.MessageStore) { // for the previously selected UID. if len(store.Uids) > ml.nmsgs && ml.nmsgs != 0 { for i := 0; i < len(store.Uids)-ml.nmsgs; i++ { - ml.Scroll() + ml.Store().Next() } } if len(store.Uids) < ml.nmsgs && ml.nmsgs != 0 { for i := 0; i < ml.nmsgs-len(store.Uids); i++ { - ml.Scroll() + ml.Store().Prev() } } ml.nmsgs = len(store.Uids)