diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-05-26 11:58:14 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-05-26 11:58:14 -0400 |
commit | 887ff6550d64aa0243192c922c977f41ce549e42 (patch) | |
tree | 92c09d90206b6d5c85ca35eba3678726c56a0357 /commands | |
parent | 3cf6c82633fb153663e7927e20818f355d949a89 (diff) | |
download | aerc-887ff6550d64aa0243192c922c977f41ce549e42.tar.gz |
Implement :edit in compose screen
Diffstat (limited to 'commands')
-rw-r--r-- | commands/compose/edit.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/commands/compose/edit.go b/commands/compose/edit.go new file mode 100644 index 00000000..18ba4817 --- /dev/null +++ b/commands/compose/edit.go @@ -0,0 +1,21 @@ +package compose + +import ( + "errors" + + "git.sr.ht/~sircmpwn/aerc/widgets" +) + +func init() { + register("edit", CommandEdit) +} + +func CommandEdit(aerc *widgets.Aerc, args []string) error { + if len(args) != 1 { + return errors.New("Usage: edit") + } + composer, _ := aerc.SelectedTab().(*widgets.Composer) + composer.ShowTerminal() + composer.FocusTerminal() + return nil +} |