diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/msglist.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go index d3c82a5f..1624e647 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -111,8 +111,10 @@ func (ml *MessageList) storeUpdate(store *lib.MessageStore) { if ml.store != store { return } - for ml.selected >= len(ml.store.Uids) { - ml.Prev() + if len(ml.store.Uids) > 0 { + for ml.selected >= len(ml.store.Uids) { + ml.Prev() + } } ml.Invalidate() } |