summary refs log tree commit diff stats
path: root/commands/terminal
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-30 21:45:41 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-30 21:45:41 -0400
commit5d0402aeea1dcc69adb46227ab1cd73b5e768880 (patch)
treefeac387ac2441d36a8bca272efa182884c11f05c /commands/terminal
parent04d9ab3ce6b8161ef7bc0ec4e5011f6ceadb73b6 (diff)
downloadaerc-5d0402aeea1dcc69adb46227ab1cd73b5e768880.tar.gz
Add message view commands, :close
Diffstat (limited to 'commands/terminal')
-rw-r--r--commands/terminal/close.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/commands/terminal/close.go b/commands/terminal/close.go
index 0a9d100..aee7f3e 100644
--- a/commands/terminal/close.go
+++ b/commands/terminal/close.go
@@ -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