diff options
author | Aditya Srivastava <adityasri@ocf.berkeley.edu> | 2019-08-11 20:42:49 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-13 10:49:34 +0900 |
commit | f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0 (patch) | |
tree | 51749e0d818357854791dbfdd8428d6c29035873 /commands/compose/abort.go | |
parent | 72204d1f24d4082acc750b73dcda6981edd21a38 (diff) |
add close command at global level
Diffstat (limited to 'commands/compose/abort.go')
-rw-r--r-- | commands/compose/abort.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/commands/compose/abort.go b/commands/compose/abort.go deleted file mode 100644 index 4c121d7..0000000 --- a/commands/compose/abort.go +++ /dev/null @@ -1,33 +0,0 @@ -package compose - -import ( - "errors" - - "git.sr.ht/~sircmpwn/aerc/widgets" -) - -type Abort struct{} - -func init() { - register(Abort{}) -} - -func (_ Abort) Aliases() []string { - return []string{"abort"} -} - -func (_ Abort) Complete(aerc *widgets.Aerc, args []string) []string { - return nil -} - -func (_ Abort) Execute(aerc *widgets.Aerc, args []string) error { - if len(args) != 1 { - return errors.New("Usage: abort") - } - composer, _ := aerc.SelectedTab().(*widgets.Composer) - - aerc.RemoveTab(composer) - composer.Close() - - return nil -} |