Skip to content
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

Subsequent calls to find in Files (⇧⌘F) shortcut causes unexpected buffer focus #43784

Closed
brian-slate opened this issue Feb 15, 2018 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug search Search widget and operation issues verified Verification succeeded
Milestone

Comments

@brian-slate
Copy link

The Issue

The find in Files (⇧⌘F) keyboard shortcut focuses the editor instead of highlighting the current search term on subsequent executions.

Contrary to most editors, while the search field is focused, the second press of ⇧⌘F causes the right-hand editor pane to become focused. This then inadvertently becomes the cause of potential erroneous character entry into the currently loaded buffer.

Under normal behavior, I would expect to:

  1. Press ⇧⌘F
  2. Type a search term and press enter to execute search
  3. Not find what I'm looking for, press ⇧⌘F again to highlight existing term
  4. Type a new search term and press enter to execute the new search

Proposed solution

After a search, the next call to Find in Files (⇧⌘F) would highlight the current search term instead of the editor. Subsequent calls would toggle back to editor focus. In addition, if no search was performed initially, the subsequent call would again return to the editor. This would: 1. Only minimally affect existing behavior; 2. Bring current behavior into line with most other editors, and 3. Maintain the ability to toggle between the search field and the editor.


VS Code Info

  • VSCode Version: Code 1.19.3 (7c4205b, 2018-01-25T10:25:01.248Z)
  • OS Version: Darwin x64 17.4.0
  • Extensions:
Extension Author (truncated) Version
material-icon-theme PKi 3.2.2
code-settings-sync Sha 2.8.7
markdown-preview-github-styles bie 0.1.0
vscode-eslint dba 1.4.5
vscode-coffeescript-preview dre 0.1.4
gitlens eam 8.0.0
vscode-power-mode hoo 2.1.0
goto-last-edit-location kri 0.2.1
id-generator mat 1.0.0
csharp ms- 1.14.0
debugger-for-chrome msj 4.1.0
coffeescript-formatter prp 1.0.1
code-spell-checker str 1.6.3
language-stylus sys 1.9.0
hipsum thi 1.0.7
selectline-statusbar tom 0.0.2

Steps to Reproduce:

  1. press ⇧⌘F
  2. type something in the search
  3. press ⇧⌘F again, note that the editor buffer is focused instead of the existing search field

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the search Search widget and operation issues label Feb 15, 2018
@roblourens
Copy link
Member

roblourens commented Feb 15, 2018

This is by design, but there have been a lot of issues about this, and I'm second guessing this behavior as the default, and I want to leave this open and consider this for some point in the future.

fyi @sandy081

@roblourens roblourens added the under-discussion Issue is under discussion for relevance, priority, approach label Feb 15, 2018
@roblourens roblourens added this to the June 2018 milestone Jun 11, 2018
@roblourens
Copy link
Member

roblourens commented Jun 11, 2018

@sandy081 I think I should change this during this month, as long as we're already changing keyboard shortcuts around search.

This would just be a change to the default keybindings so that cmd+shift+f would not focus the editor, when focus is in the search input box.

@sandy081
Copy link
Member

Yeah makes sense to me.

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug and removed under-discussion Issue is under discussion for relevance, priority, approach labels Jun 26, 2018
@mjbvz mjbvz added the verified Verification succeeded label Jun 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug search Search widget and operation issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants