aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/compose.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 06452230..ae3bca13 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -609,14 +609,16 @@ func (c *Composer) Event(event tcell.Event) bool {
func (c *Composer) MouseEvent(localX int, localY int, event tcell.Event) {
c.Lock()
- defer c.Unlock()
for _, e := range c.focusable {
he, ok := e.(*headerEditor)
if ok && he.focused {
he.focused = false
}
}
+ c.Unlock()
c.grid.MouseEvent(localX, localY, event)
+ c.Lock()
+ defer c.Unlock()
for i, e := range c.focusable {
he, ok := e.(*headerEditor)
if ok && he.focused {