aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-11-24 20:39:46 +0100
committerRobin Jarry <robin@jarry.cc>2023-11-24 22:45:03 +0100
commitc76121437852abd312327925a50c1f7fe977afce (patch)
tree9b9988ad86c8df03a2a67f5cc072dd637f6ef5a8 /commands
parent8ee61777ada29432783e18a7634ab1150a631987 (diff)
downloadaerc-c76121437852abd312327925a50c1f7fe977afce.tar.gz
flag,unflag: fix -a option for the answered flag
Fix the -a option to correctly set or unset the answered flag. Fixes: https://todo.sr.ht/~rjarry/aerc/199 Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands')
-rw-r--r--commands/msg/read.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/msg/read.go b/commands/msg/read.go
index a92a4d0a..e682a156 100644
--- a/commands/msg/read.go
+++ b/commands/msg/read.go
@@ -65,6 +65,10 @@ func (f FlagMsg) Execute(args []string) error {
f.Flag = models.SeenFlag
f.FlagName = "seen"
case "flag", "unflag":
+ if f.Answered {
+ f.Flag = models.AnsweredFlag
+ f.FlagName = "answered"
+ }
if f.Flag == 0 {
f.Flag = models.FlaggedFlag
f.FlagName = "flagged"