Files
zed/crates/workspace
Smit Barmase 60919b0248 workspace: Don't let focus follows mouse steal focus from single-line inputs (#66167)
Closes #62822
Closes #63437
Closes #63795
Closes #59181

With `focus_follows_mouse` on, renaming or creating a file in the
project panel cancels itself as soon as the mouse rests on the panel or
a pane. Focus moves away and the rename field treats that as "done".
Terminal tab rename and a few other inline inputs have the same problem.

Now focus follows mouse leaves focus alone while a single-line editor is
focused, until you press Enter or Escape or click elsewhere.

Approaches considered:
- Skip when the hovered area already contains focus: fixes hovering the
project panel itself, but not when the context menu closes over a pane.
- Have the project panel opt out while editing: works, but every other
inline input would need the same.
- Only react to real mouse movement: still breaks as soon as you nudge
the mouse.

Release Notes:

- Fixed renaming files, creating files and renaming terminal tabs being
cancelled when `focus_follows_mouse` is enabled and the mouse moves.
2026-10-26 13:45:26 +00:00
..