aboutsummaryrefslogtreecommitdiffstats
path: root/commands/compose/postpone.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/compose/postpone.go')
-rw-r--r--commands/compose/postpone.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/commands/compose/postpone.go b/commands/compose/postpone.go
index e1c0568b..4b1e4419 100644
--- a/commands/compose/postpone.go
+++ b/commands/compose/postpone.go
@@ -35,9 +35,13 @@ func (Postpone) Execute(aerc *widgets.Aerc, args []string) error {
if acct == nil {
return errors.New("No account selected")
}
- composer, _ := aerc.SelectedTabContent().(*widgets.Composer)
+ tab := aerc.SelectedTab()
+ if tab == nil {
+ return errors.New("No tab selected")
+ }
+ composer, _ := tab.Content.(*widgets.Composer)
config := composer.Config()
- tabName := aerc.TabNames()[aerc.SelectedTabIndex()]
+ tabName := tab.Name
if config.Postpone == "" {
return errors.New("No Postpone location configured")