Implement :edit in compose screen
This commit is contained in:
parent
3cf6c82633
commit
887ff6550d
4 changed files with 80 additions and 28 deletions
commands/compose
21
commands/compose/edit.go
Normal file
21
commands/compose/edit.go
Normal file
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue