From f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0 Mon Sep 17 00:00:00 2001 From: Aditya Srivastava Date: Sun, 11 Aug 2019 20:42:49 -0700 Subject: add close command at global level --- commands/msgview/close.go | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 commands/msgview/close.go (limited to 'commands/msgview') 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 -} -- cgit 1.4.1-2-gfad0