aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-06-11 10:08:44 -0400
committerDrew DeVault <sir@cmpwn.com>2019-06-11 10:08:44 -0400
commit408a9e7b103e427db673c531b2a6f92fe8a26964 (patch)
treef94bab37d3fe57b6292ffd97ed2cf55683262df5
parent0494c9ae9d8de274fd284db70e9977cc1fc515ae (diff)
downloadaerc-408a9e7b103e427db673c531b2a6f92fe8a26964.tar.gz
Fix automatic scrolling when messages arrive/leave
-rw-r--r--widgets/msglist.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index 43c2ee49..ae50b0d0 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)