summary refs log tree commit diff stats
path: root/widgets/msglist.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-15 01:46:14 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-15 01:46:14 -0400
commit24dfc4712647008a89d930b269b085c6c3f2fb2d (patch)
tree0f64c306f8e3dd28fea5c8b900ef37078607e14d /widgets/msglist.go
parent8d20e9218ece5927d786d6e2fac5c50572fb9c81 (diff)
downloadaerc-24dfc4712647008a89d930b269b085c6c3f2fb2d.tar.gz
Rig up key bindings
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()