summary refs log tree commit diff stats
path: root/doc/pydoc/ranger.gui.curses_shortcuts.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/pydoc/ranger.gui.curses_shortcuts.html')
0 files changed, 0 insertions, 0 deletions
d $EDITOR, internal config for compose' href='/akspecs/aerc/commit/commands/account/compose.go?h=0.5.0&id=065da5e37230976d85d163a6f682eddb9345aede'>065da5e ^
2c486cb ^








577248f ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32




                











                                                           
                                      
                                                                            








                                                       



                  
package account

import (
	"errors"

	"git.sr.ht/~sircmpwn/aerc2/widgets"
)

func init() {
	register("compose", Compose)
}

// TODO: Accept arguments for default headers, message body
func Compose(aerc *widgets.Aerc, args []string) error {
	if len(args) != 1 {
		return errors.New("Usage: compose")
	}
	acct := aerc.SelectedAccount()
	composer := widgets.NewComposer(aerc.Config(), acct.AccountConfig())
	tab := aerc.NewTab(composer, "New email")
	composer.OnSubjectChange(func(subject string) {
		if subject == "" {
			tab.Name = "New email"
		} else {
			tab.Name = subject
		}
		tab.Content.Invalidate()
	})
	return nil
}