summary refs log tree commit diff stats
path: root/commands/account/view-message.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/account/view-message.go')
-rw-r--r--commands/account/view-message.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/commands/account/view-message.go b/commands/account/view-message.go
index edafd09..ea6addc 100644
--- a/commands/account/view-message.go
+++ b/commands/account/view-message.go
@@ -17,8 +17,14 @@ func ViewMessage(aerc *widgets.Aerc, args []string) error {
 		return errors.New("Usage: view-message")
 	}
 	acct := aerc.SelectedAccount()
+	if acct.Messages().Empty() {
+		return nil
+	}
 	store := acct.Messages().Store()
 	msg := acct.Messages().Selected()
+	if msg == nil {
+		return nil
+	}
 	viewer := widgets.NewMessageViewer(aerc.Config(), store, msg)
 	aerc.NewTab(viewer, runewidth.Truncate(
 		msg.Envelope.Subject, 32, "…"))
go?h=0.2.0&id=4465646fedc5dd3efa680a7cc8d06671350b75b9'>^
95875b1 ^
28fc9fa ^
700dea2 ^
28fc9fa ^
700dea2 ^

1a4cc31 ^
22cc40f ^
700dea2 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32