aboutsummaryrefslogtreecommitdiff
path: root/widgets/msglist.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r--widgets/msglist.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index 36d7f7a..5ba75a8 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -184,10 +184,10 @@ func (ml *MessageList) SetStore(store *MessageStore) {
func (ml *MessageList) nextPrev(delta int) {
ml.selected += delta
if ml.selected < 0 {
- ml.selected = len(ml.store.Uids) - 1
+ ml.selected = 0
}
if ml.selected >= len(ml.store.Uids) {
- ml.selected = 0
+ ml.selected = len(ml.store.Uids) - 1
}
// TODO: scrolling
ml.Invalidate()