From 0f78cb2ea97ca501b6eb0d659f883197753ee075 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Sun, 23 Oct 2022 21:27:06 +0200 Subject: lib: implement an eml message view Implement a MessageView representation for eml data that are not stored in a message store. With this, we can display any rfc822 message data in the message viewer. Signed-off-by: Koni Marti Acked-by: Robin Jarry --- commands/msgview/next.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'commands/msgview') diff --git a/commands/msgview/next.go b/commands/msgview/next.go index 5df7847d..a32e358f 100644 --- a/commands/msgview/next.go +++ b/commands/msgview/next.go @@ -2,6 +2,7 @@ package msgview import ( "errors" + "fmt" "git.sr.ht/~rjarry/aerc/commands/account" "git.sr.ht/~rjarry/aerc/lib" @@ -35,6 +36,9 @@ func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error { return errors.New("No account selected") } store := mv.Store() + if store == nil { + return fmt.Errorf("Cannot perform action. No message store set.") + } err = account.ExecuteNextPrevMessage(args, acct, pct, n) if err != nil { return err -- cgit