diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-05-16 12:39:22 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-05-16 12:39:22 -0400 |
commit | 8be59cae6c133f38fa534df2dc9f79e6c7a810fb (patch) | |
tree | 5cda762c19856a2b2ebb65b12468b84c3fede483 /widgets | |
parent | 475b697bdfd7a5821282174f14f8d904e47aff4d (diff) | |
download | aerc-8be59cae6c133f38fa534df2dc9f79e6c7a810fb.tar.gz |
Implement :reply -q and :reply -a
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/compose.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/widgets/compose.go b/widgets/compose.go index 02a9d0c..14dfaaa 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -124,6 +124,15 @@ func (c *Composer) Defaults(defaults map[string]string) *Composer { return c } +// Note: this does not reload the editor. You must call this before the first +// Draw() call. +func (c *Composer) SetContents(reader io.Reader) *Composer { + c.email.Seek(0, os.SEEK_SET) + io.Copy(c.email, reader) + c.email.Seek(0, os.SEEK_SET) + return c +} + func (c *Composer) FocusTerminal() *Composer { c.focusable[c.focused].Focus(false) c.focused = 3 |