aboutsummaryrefslogtreecommitdiff
path: root/commands/compose
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-26 11:58:14 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-26 11:58:14 -0400
commit887ff6550d64aa0243192c922c977f41ce549e42 (patch)
tree92c09d90206b6d5c85ca35eba3678726c56a0357 /commands/compose
parent3cf6c82633fb153663e7927e20818f355d949a89 (diff)
Implement :edit in compose screen
Diffstat (limited to 'commands/compose')
-rw-r--r--commands/compose/edit.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/commands/compose/edit.go b/commands/compose/edit.go
new file mode 100644
index 0000000..18ba481
--- /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
+}