about summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2019-07-16 16:33:47 +0100
committerDrew DeVault <sir@cmpwn.com>2019-07-17 16:00:02 -0400
commit8534720e724f4fd38c7ef4fed1e95bc10aa08bfa (patch)
treea5e734c50604f659d6ad2476a8fedc488140b9c0 /widgets
parent038bf711fae3305a57467392ae2c281caa15bbb9 (diff)
downloadaerc-8534720e724f4fd38c7ef4fed1e95bc10aa08bfa.tar.gz
When reviewing an email don't pass characters on
This stops characters being passed to the focused box when reviewing an
email. To edit headers the user should go back to the edit page.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/compose.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index d0a4629..a68bbe1 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -177,7 +177,10 @@ func (c *Composer) Bindings() string {
 }
 
 func (c *Composer) Event(event tcell.Event) bool {
-	return c.focusable[c.focused].Event(event)
+	if c.editor != nil {
+		return c.focusable[c.focused].Event(event)
+	}
+	return false
 }
 
 func (c *Composer) Focus(focus bool) {
45 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232