aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msgview/toggle-key-passthrough.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msgview/toggle-key-passthrough.go')
-rw-r--r--commands/msgview/toggle-key-passthrough.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/msgview/toggle-key-passthrough.go b/commands/msgview/toggle-key-passthrough.go
index 6cd575bf..1ac370e6 100644
--- a/commands/msgview/toggle-key-passthrough.go
+++ b/commands/msgview/toggle-key-passthrough.go
@@ -3,6 +3,7 @@ package msgview
import (
"errors"
+ "git.sr.ht/~rjarry/aerc/lib/statusline"
"git.sr.ht/~rjarry/aerc/widgets"
)
@@ -26,10 +27,8 @@ func (ToggleKeyPassthrough) Execute(aerc *widgets.Aerc, args []string) error {
}
mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
keyPassthroughEnabled := mv.ToggleKeyPassthrough()
- if keyPassthroughEnabled {
- aerc.SetExtraStatus("[passthrough]")
- } else {
- aerc.ClearExtraStatus()
+ if acct := mv.SelectedAccount(); acct != nil {
+ acct.SetStatus(statusline.Passthrough(keyPassthroughEnabled))
}
return nil
}