From 887ff6550d64aa0243192c922c977f41ce549e42 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 26 May 2019 11:58:14 -0400 Subject: Implement :edit in compose screen --- commands/compose/edit.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 commands/compose/edit.go (limited to 'commands/compose') 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 +} -- cgit v1.2.3