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
122122 private getKeybinding ( ) {
123123 const keybindings = this . keybindingService . lookupKeybindings ( 'interactive.execute' ) ;
124124 const shiftEnterConfig = this . configurationService . getValue ( InteractiveWindowSetting . executeWithShiftEnter ) ;
125- const hasChord = ( chord : string , kb : ResolvedKeybinding ) => {
125+ const hasEnterChord = ( kb : ResolvedKeybinding , modifier : string = '' ) => {
126126 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 ) ;
128130 } ;
129131
130132 if ( shiftEnterConfig ) {
131- const keybinding = keybindings . find ( kb => hasChord ( 'shift+Enter' , kb ) ) ;
133+ const keybinding = keybindings . find ( kb => hasEnterChord ( kb , 'shift+' ) ) ;
132134 if ( keybinding ) {
133135 return keybinding ;
134136 }
135137 } else {
136- let keybinding = keybindings . find ( kb => hasChord ( 'Enter' , kb ) ) ;
138+ let keybinding = keybindings . find ( kb => hasEnterChord ( kb ) ) ;
137139 if ( keybinding ) {
138140 return keybinding ;
139141 }
140142 keybinding = this . keybindingService . lookupKeybindings ( 'python.execInREPLEnter' )
141- . find ( kb => hasChord ( 'Enter' , kb ) ) ;
143+ . find ( kb => hasEnterChord ( kb ) ) ;
142144 if ( keybinding ) {
143145 return keybinding ;
144146 }
You can’t perform that action at this time.
0 commit comments