aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/delete.go15
-rw-r--r--commands/msg/reply.go2
2 files changed, 8 insertions, 9 deletions
diff --git a/commands/msg/delete.go b/commands/msg/delete.go
index 34eac72f..5eb622de 100644
--- a/commands/msg/delete.go
+++ b/commands/msg/delete.go
@@ -88,15 +88,14 @@ func findNextNonDeleted(deleted []uint32, store *lib.MessageStore) *models.Messa
if !contains(deleted, selected.Uid) {
return selected
}
- for {
- store.Next()
- next := store.Selected()
- if next == selected || next == nil {
- // the last message is in the deleted state or doesn't exist
- return nil
- }
- return next
+
+ store.Next()
+ next := store.Selected()
+ if next == selected || next == nil {
+ // the last message is in the deleted state or doesn't exist
+ return nil
}
+ return next
}
func contains(uids []uint32, uid uint32) bool {
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index c3ab202c..30b09b62 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -122,7 +122,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
}
}
if len(to) == 0 {
- to = append(msg.Envelope.To)
+ to = msg.Envelope.To
}
}