Skip to content
GitHub no longer supports this web browser. Learn more about the browsers we support.
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On macOS the behavior for Cmd+E is incorrect #44093

Closed
vincentisambart opened this issue Feb 21, 2018 · 7 comments · Fixed by #63176
Closed

On macOS the behavior for Cmd+E is incorrect #44093

vincentisambart opened this issue Feb 21, 2018 · 7 comments · Fixed by #63176
Assignees
Milestone

Comments

@vincentisambart
Copy link

@vincentisambart vincentisambart commented Feb 21, 2018

Issue Type

Bug

Description

On most macOS applications (for example TextEdit or Xcode), Cmd+E sets the find clipboard to what is selected without changing the focus (in fact it doesn't even make the search bar appear).
VS Code makes the search bar appear and set the focus to it.

Having the search bar appearing is minor, but if you are used to the standard behavior, not having the editor keep the focus on the editor is pretty disturbing.

VS Code Info

VS Code version: Code 1.20.1 (f88bbf9, 2018-02-13T15:23:28.607Z)
OS version: Darwin x64 17.4.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz (8 x 2300)
Load (avg) 3, 2, 2
Memory (System) 16.00GB (0.81GB free)
Process Argv /Applications/Visual Studio Code.app/Contents/MacOS/Electron ./te
Screen Reader no
VM 0%
Extensions (3)
Extension Author (truncated) Version
cpptools ms- 0.15.0
Ruby reb 0.16.0
rust rus 0.3.2
Reproduces without extensions
@bpasero bpasero assigned rebornix and unassigned bpasero Feb 21, 2018
@rebornix rebornix added this to the Backlog milestone Sep 5, 2018
@rebornix rebornix added the ux label Sep 5, 2018
@lionello

This comment has been minimized.

Copy link
Contributor

@lionello lionello commented Nov 15, 2018

Relevant line in the code:
https://github.com/Microsoft/vscode/blob/17454d4e88886404af130639b979498b227a9167/src/vs/editor/contrib/find/findController.ts#L474

Should change to:

				shouldFocus: FindStartFocusAction.NoFocusChange,
@lionello

This comment has been minimized.

Copy link
Contributor

@lionello lionello commented Nov 15, 2018

@vincentisambart Could you edit the title of this issue to emphasize that it's related to the focus? The issue is also unrelated to macOS. Perhaps something like "Cmd+E (action.findWithSelection) should not focus the find widget".

lionello added a commit to lionello/vscode that referenced this issue Nov 15, 2018
This fixes microsoft#44093
@timestretch

This comment has been minimized.

Copy link

@timestretch timestretch commented Sep 12, 2019

Are there any plans on merging a fix for this issue? Addressing this issue would go a long way to making Cmd-E in vscode work the way long time Mac users expect.

@nathany

This comment has been minimized.

Copy link

@nathany nathany commented Oct 22, 2019

This should also appear in the menu. Here are some examples -- also to portray how prevalent this feature is, and implemented in a common way in seemingly everything but VS Code.

Xcode: Find > Use Selection for Find ⌘E
Sublime Text: Find > Use Selection for Find ⌘E
TextMate: Edit > Find > Use Selection for Find ⌘E
BBEdit: Search > Use Selection for Find ⌘E
Atom: appears to be missing this altogether
Day One: Edit > Find > Use Selection for Find
Apple Books: Edit > Find > Use Selection for Find ⌘E
(you get the idea)

Note that ⇧⌘E should be Use Selection for Replace to match other Mac apps.

(as per my post to #69498)

@rebornix

This comment has been minimized.

Copy link
Member

@rebornix rebornix commented Oct 25, 2019

Thanks all for your contribution on this topic. Considering this command is only registered with keybindings CMD+E on macOS, I think it makes sense to align it with all other applications on macOS. CMD+E won't focus on the find widget from tomorrow's Insiders. While users can still use CMD+F with seed find from selection to archive previous experience.

@vincentisambart

This comment has been minimized.

Copy link
Author

@vincentisambart vincentisambart commented Nov 8, 2019

The fix is included in 1.40.0 🎉
Thanks @lionello @rebornix!

@briankendall

This comment has been minimized.

Copy link

@briankendall briankendall commented Nov 8, 2019

Thank you! This one little fix will drastically improve my experience using VS Code.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
7 participants
You can’t perform that action at this time.