File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/vs/workbench/contrib/interactive/browser Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -122,23 +122,25 @@ export class ReplInputHintContentWidget extends Disposable implements IContentWi
122
122
private getKeybinding ( ) {
123
123
const keybindings = this . keybindingService . lookupKeybindings ( 'interactive.execute' ) ;
124
124
const shiftEnterConfig = this . configurationService . getValue ( InteractiveWindowSetting . executeWithShiftEnter ) ;
125
- const hasChord = ( chord : string , kb : ResolvedKeybinding ) => {
125
+ const hasEnterChord = ( kb : ResolvedKeybinding , modifier : string = '' ) => {
126
126
const chords = kb . getDispatchChords ( ) ;
127
- return chords . length === 1 && chords [ 0 ] === chord ;
127
+ const chord = modifier + 'Enter' ;
128
+ const chordAlt = modifier + '[Enter]' ;
129
+ return chords . length === 1 && ( chords [ 0 ] === chord || chords [ 0 ] === chordAlt ) ;
128
130
} ;
129
131
130
132
if ( shiftEnterConfig ) {
131
- const keybinding = keybindings . find ( kb => hasChord ( 'shift+Enter' , kb ) ) ;
133
+ const keybinding = keybindings . find ( kb => hasEnterChord ( kb , 'shift+' ) ) ;
132
134
if ( keybinding ) {
133
135
return keybinding ;
134
136
}
135
137
} else {
136
- let keybinding = keybindings . find ( kb => hasChord ( 'Enter' , kb ) ) ;
138
+ let keybinding = keybindings . find ( kb => hasEnterChord ( kb ) ) ;
137
139
if ( keybinding ) {
138
140
return keybinding ;
139
141
}
140
142
keybinding = this . keybindingService . lookupKeybindings ( 'python.execInREPLEnter' )
141
- . find ( kb => hasChord ( 'Enter' , kb ) ) ;
143
+ . find ( kb => hasEnterChord ( kb ) ) ;
142
144
if ( keybinding ) {
143
145
return keybinding ;
144
146
}
You can’t perform that action at this time.
0 commit comments