zed icon indicating copy to clipboard operation
zed copied to clipboard

Focus follows mouse

Open simoncocking opened this issue 1 year ago • 7 comments
trafficstars

Check for existing issues

  • [X] Completed

Describe the feature

Add a configuration option to send focus to the editor pane (or terminal) under the mouse cursor. AKA focus follows mouse.

To elaborate, #4336 describes part of the problem: when you return focus to Zed after activity in another app, the click serves only to focus Zed and does not activate the pane that was actually clicked; rather, the last active pane gets focus. I cannot describe how frustratingly often this bites me - especially when using an integrated terminal in Zed. Having come from desktop Linux many years ago and finding focus-follows-mouse in iTerm2, Zed focuses exactly the wrong thing every single time.

Having:

  1. the initial app-focusing click also focus the pane clicked; and
  2. focus follow the mouse to whichever editor pane it's over

would be a massive quality of life improvement.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

simoncocking avatar Feb 22 '24 04:02 simoncocking

Hey @simoncocking, can you check this issue out and see if it covers what you are asking? They feel the same, but not entirely sure - I'll let you make the call:

  • https://github.com/zed-industries/zed/issues/4336

JosephTLyons avatar Feb 23 '24 18:02 JosephTLyons

Hi @JosephTLyons, I referenced that issue in my description above and commented on it directly a few days ago.

Basically I'd consider what #4336 describes as a bug: I expect focus to be directed wherever I click, not wherever it was the last time the app had focus. What I'm describing here would be more of a feature request: send focus to whichever editor pane is under the mouse cursor.

Focus-follows-mouse has long been a quality-of-life improvement in X Windows desktops. iTerm2/3 supports it on the Mac and it's wonderful; it would be equally wonderful in Zed.

simoncocking avatar Feb 25 '24 23:02 simoncocking

Hi @JosephTLyons, I referenced that issue in my description above and commented on it directly a few days ago.

Basically I'd consider what #4336 describes as a bug: I expect focus to be directed wherever I click, not wherever it was the last time the app had focus. What I'm describing here would be more of a feature request: send focus to whichever editor pane is under the mouse cursor.

Focus-follows-mouse has long been a quality-of-life improvement in X Windows desktops. iTerm2/3 supports it on the Mac and it's wonderful; it would be equally wonderful in Zed.

Ah, you're right. I'm sorry, the speed at which we are getting issues is making it harder and harder catch all the details in these. My apologies! Thanks for bearing with me and repeating what you've already said. 🤦

JosephTLyons avatar Feb 25 '24 23:02 JosephTLyons

I would love focus follows mouse as well! It makes working with multiple panes (editor, terminal, etc) way faster and more comfortable ...

MrHaroldA avatar Aug 01 '24 09:08 MrHaroldA