about summary refs log tree commit diff stats
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-16 12:39:22 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-16 12:39:22 -0400
commit8be59cae6c133f38fa534df2dc9f79e6c7a810fb (patch)
tree5cda762c19856a2b2ebb65b12468b84c3fede483 /widgets/compose.go
parent475b697bdfd7a5821282174f14f8d904e47aff4d (diff)
downloadaerc-8be59cae6c133f38fa534df2dc9f79e6c7a810fb.tar.gz
Implement :reply -q and :reply -a
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go9
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
fefbc5229'>^
2f02189d ^

4a39d12d ^
2f02189d ^
e5c11a51 ^
9e751bb8 ^

2f02189d ^





e5c11a51 ^






















2f02189d ^


e5c11a51 ^
2f02189d ^
204dae92 ^




97eb971b ^
204dae92 ^



6c52e24e ^
204dae92 ^




9e751bb8 ^



204dae92 ^



9e751bb8 ^



204dae92 ^



9e751bb8 ^





6c52e24e ^
9e751bb8 ^





204dae92 ^


6c52e24e ^
204dae92 ^

97eb971b ^
204dae92 ^
97eb971b ^
204dae92 ^


6c52e24e ^
204dae92 ^



9e751bb8 ^






204dae92 ^



6c52e24e ^
204dae92 ^




9e751bb8 ^











204dae92 ^



97eb971b ^

204dae92 ^

2f02189d ^



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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164