about summary refs log tree commit diff stats
path: root/commands/msgview
diff options
context:
space:
mode:
authorAditya Srivastava <adityasri@ocf.berkeley.edu>2019-08-11 20:42:49 -0700
committerDrew DeVault <sir@cmpwn.com>2019-08-13 10:49:34 +0900
commitf0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0 (patch)
tree51749e0d818357854791dbfdd8428d6c29035873 /commands/msgview
parent72204d1f24d4082acc750b73dcda6981edd21a38 (diff)
downloadaerc-f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0.tar.gz
add close command at global level
Diffstat (limited to 'commands/msgview')
-rw-r--r--commands/msgview/close.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/commands/msgview/close.go b/commands/msgview/close.go
deleted file mode 100644
index 6a7eb0a..0000000
--- a/commands/msgview/close.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package msgview
-
-import (
-	"errors"
-
-	"git.sr.ht/~sircmpwn/aerc/widgets"
-)
-
-type Close struct{}
-
-func init() {
-	register(Close{})
-}
-
-func (_ Close) Aliases() []string {
-	return []string{"close"}
-}
-
-func (_ Close) Complete(aerc *widgets.Aerc, args []string) []string {
-	return nil
-}
-
-func (_ Close) Execute(aerc *widgets.Aerc, args []string) error {
-	if len(args) != 1 {
-		return errors.New("Usage: close")
-	}
-	mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
-	aerc.RemoveTab(mv)
-	return nil
-}