-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Bug: Open the "find widget" (cmd+f), type whatever you want to search (that has multiple matches in the open file), hit enter a couple times. It will cycle forward through matches. Now hit shift+enter. Expected behavior: The match should cycle backward to the previous match ("Find Previous"). Actual behavior π: VS Code instead displays a mini-text pop-up saying "No code actions for 'wdl.run' available".
Cause: This behavior is caused by the very broad shift+enter keybinding to kick off a wdl.run code action. See here:
wdl-ide/client/vscode/package.json
Line 27 in e47a94d
| "key": "shift+enter", |
Because "Find Previous" also uses
shift+enter, these two conflict (there are also a lot of other possible conflicts, see the Keyboard Shortcuts page in VS Code and search for "shift enter"). I think because wdl-ide is an Extension, it gets precedence over the Default keybindings, so it always beats out "Find Previous". I could be wrong about the cause of precedence though: the Keyboard Shortcuts page allows you to "Sort by Precedence (Highest First)", and the above code action actually appears listed below Find Previous, but according to this issue [Extensions beat out Defaults] and this StackOverflow [You actually read precedence from bottom up in that table], I think the sort order has been flipped?
Proposed Solutions:
- Set a when clause using
editorLangIdso the keybinding only applies when it's a WDL file. - Make it a more complicated, less commonly used keybinding (eg,
shift+alt+enter) so less likely to overlap other Defaults - Set other when clauses that will help avoid matching Defaults (eg,
! findWidgetVisible)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
