aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/compose.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index ee07d1cd..eca76842 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -618,10 +618,13 @@ func (c *Composer) MouseEvent(localX int, localY int, event tcell.Event) {
c.Lock()
defer c.Unlock()
c.grid.MouseEvent(localX, localY, event)
- for _, e := range c.focusable {
+ for i, e := range c.focusable {
he, ok := e.(*headerEditor)
if ok && he.focused {
- c.FocusEditor(he.name)
+ c.focusable[c.focused].Focus(false)
+ c.focused = i
+ c.focusable[c.focused].Focus(true)
+ return
}
}
}