From 8534720e724f4fd38c7ef4fed1e95bc10aa08bfa Mon Sep 17 00:00:00 2001 From: Jeffas Date: Tue, 16 Jul 2019 16:33:47 +0100 Subject: 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. --- widgets/compose.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'widgets/compose.go') diff --git a/widgets/compose.go b/widgets/compose.go index d0a46290..a68bbe13 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) { -- cgit