aboutsummaryrefslogtreecommitdiff
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)
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) {