aboutsummaryrefslogtreecommitdiffstats
path: root/commands
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
parent3cf6c82633fb153663e7927e20818f355d949a89 (diff)
downloadaerc-887ff6550d64aa0243192c922c977f41ce549e42.tar.gz
Implement :edit in compose screen
Diffstat (limited to 'commands')
-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 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
+}