diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-21 21:00:03 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-21 21:00:03 -0400 |
commit | 0b26241b42153e83eec9a0333d138f4972fd59ab (patch) | |
tree | 0332a2b8d60787a4f81d3e36edacfa3ad511ace1 /widgets/msglist.go | |
parent | 55ad16bb706a013711c555259c37292d441894f2 (diff) | |
download | aerc-0b26241b42153e83eec9a0333d138f4972fd59ab.tar.gz |
Improve cursor handling in embedded terminal
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r-- | widgets/msglist.go | 3 |
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 |