vscode: Opening file with source:line breaks Cmd+D "Add Next Occurance"
- VSCode Version: 1.37.1
- OS Version: Mac 10.12.6
Issue
Here’s a weird one for you! This is 100% reproducible, and only appeared recently.
Whenever I open Visual Studio Code using line numbers (from iTerm2 shortcut or others), the Cmd+D shortcut key to select other instances doesn’t work until the VSCode window loses and regains focus.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
Part 1
- Have iTerm2
- Cmd + Click on a file name
- Once VSCode opens, Cmd+D on some text that should have another match
- Notice that the “Selection” menu item at the top flashes as activated, but no new matching selections are selected
Part 2
- Click around in VSCode, in the same editor, other editors, etc.
- Press Cmd+D
- Notice that the “Selection” menu item at the top flashes as activated, but no new matching selections are selected
Part 3
- Cmd+Tab to another window
- Cmd+Tab back to VSCode
- Notice that the Cmd+D key shortcut is now working as expected.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 29 (19 by maintainers)
Commits related to this issue
- debt - add some logging for #79460 — committed to microsoft/vscode by bpasero 5 years ago
@alexandrudima oh, now that I actually look into the menu code, this seems very fishy:
@sbatten it looks like we fail to send the action to the last active window at least? any particular reason?
E.g. when you check the implementation of
sendToFocusedit will do this:const focusedWindow = this.getFocusedWindow() || this.getLastActiveWindow();I wonder if we should change
IWindowsService#getFocusedWindowto do that so that we always have a window.