fix focus loss when micro openend

This commit is contained in:
2026-01-04 17:49:15 +00:00
parent f51c0b17c6
commit 4af0ff4cad
+4
View File
@@ -148,6 +148,9 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case loadNote: case loadNote:
_, cmd := m.noteView.Update(msg) _, cmd := m.noteView.Update(msg)
if msg.force {
return m, tea.Batch(cmd, tea.EnableMouseAllMotion)
}
return m, cmd return m, cmd
case loadedNote: case loadedNote:
@@ -227,6 +230,7 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
c.Stdout = os.Stdout c.Stdout = os.Stdout
c.Stderr = os.Stderr c.Stderr = os.Stderr
return m, tea.ExecProcess(c, func(err error) tea.Msg { return m, tea.ExecProcess(c, func(err error) tea.Msg {
// mouse loses focus so this is neededd
return loadNote{path: m.tree.selectedNode.path, force: true} return loadNote{path: m.tree.selectedNode.path, force: true}
}) })
} }