aboutsummaryrefslogtreecommitdiff
path: root/widgets/msglist.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-21 21:00:03 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-21 21:00:03 -0400
commit0b26241b42153e83eec9a0333d138f4972fd59ab (patch)
tree0332a2b8d60787a4f81d3e36edacfa3ad511ace1 /widgets/msglist.go
parent55ad16bb706a013711c555259c37292d441894f2 (diff)
Improve cursor handling in embedded terminal
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r--widgets/msglist.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index ac941c8..b72fb03 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -149,6 +149,9 @@ func (ml *MessageList) Select(index int) {
}
func (ml *MessageList) nextPrev(delta int) {
+ if ml.store == nil || len(ml.store.Uids) == 0 {
+ return
+ }
ml.selected += delta
if ml.selected < 0 {
ml.selected = 0