-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
use chord instead of label #218107
use chord instead of label #218107
Conversation
const keybinding = keybindings.find(kb => kb.getLabel() === 'Shift+Enter'); | ||
const keybinding = keybindings.find(kb => { | ||
const chords = kb.getDispatchChords(); | ||
return chords.length === 1 && chords[0] === 'shift+Enter'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these localized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
const keybinding = keybindings.find(kb => kb.getLabel() === 'Shift+Enter'); | ||
const keybinding = keybindings.find(kb => { | ||
const chords = kb.getDispatchChords(); | ||
return chords.length === 1 && chords[0] === 'shift+Enter'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need a capital s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's hard coded to 'shift'
src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.ts
Outdated
Show resolved
Hide resolved
let keybinding = keybindings.find(kb => { | ||
const chords = kb.getDispatchChords(); | ||
return chords.length === 1 && chords[0] === 'Enter'; | ||
}); | ||
if (keybinding) { | ||
return keybinding; | ||
} | ||
keybinding = this.keybindingService.lookupKeybindings('python.execInREPLEnter') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we looking up python.
commands in core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python shadows the command for the REPL, this hint doesn't work correctly if we don't look it up, and the point is to make this clear for python/jupyter users
…entWidget.ts Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
fix #217901
Dispatch cords are strings built from hard coded values, whereas labels are configured from an OS specific mapping.