diff options
Diffstat (limited to 'commands/compose/send.go')
-rw-r--r-- | commands/compose/send.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go index 776779e6..cca1540f 100644 --- a/commands/compose/send.go +++ b/commands/compose/send.go @@ -43,8 +43,12 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error { if len(args) > 1 { return errors.New("Usage: send") } - composer, _ := aerc.SelectedTabContent().(*widgets.Composer) - tabName := aerc.TabNames()[aerc.SelectedTabIndex()] + tab := aerc.SelectedTab() + if tab == nil { + return errors.New("No selected tab") + } + composer, _ := tab.Content.(*widgets.Composer) + tabName := tab.Name config := composer.Config() if config.Outgoing == "" { |