From 0b26241b42153e83eec9a0333d138f4972fd59ab Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 21 Mar 2019 21:00:03 -0400 Subject: Improve cursor handling in embedded terminal --- widgets/msglist.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'widgets/msglist.go') 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 -- cgit v1.2.3