Add message view commands, :close
This commit is contained in:
parent
04d9ab3ce6
commit
5d0402aeea
6 changed files with 47 additions and 5 deletions
commands/terminal
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue