Add message view commands, :close

This commit is contained in:
Drew DeVault 2019-03-30 21:45:41 -04:00
parent 04d9ab3ce6
commit 5d0402aeea
6 changed files with 47 additions and 5 deletions
commands/terminal

View file

@ -14,10 +14,7 @@ func CommandClose(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: close")
}
term, ok := aerc.SelectedTab().(*widgets.Terminal)
if !ok {
return errors.New("Error: not a terminal")
}
term, _ := aerc.SelectedTab().(*widgets.Terminal)
term.Close(nil)
aerc.RemoveTab(term)
return nil