about summary refs log tree commit diff stats
path: root/commands/compose/edit.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/compose/edit.go')
-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
+}