summary refs log tree commit diff stats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/msg/delete.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/msg/delete.go b/commands/msg/delete.go
index 5a72fc9..104e1e1 100644
--- a/commands/msg/delete.go
+++ b/commands/msg/delete.go
@@ -35,6 +35,9 @@ func (_ Delete) Execute(aerc *widgets.Aerc, args []string) error {
 		return errors.New("No account selected")
 	}
 	store := widget.Store()
+	if len(store.Uids) == 0 {
+		return errors.New("No message selected")
+	}
 	msg := widget.SelectedMessage()
 	_, isMsgView := widget.(*widgets.MessageViewer)
 	if isMsgView {