@@ -263,10 +263,9 @@ export class SuggestController implements IEditorContribution {
263263 insertText = SnippetParser . escape ( insertText ) ;
264264 }
265265
266- // const overwriteConfig = flags & InsertFlags.AlternativeOverwriteConfig
267- // ? !this._editor.getOption(EditorOption.suggest).overwriteOnAccept
268- // : this._editor.getOption(EditorOption.suggest).overwriteOnAccept;
269- const overwriteConfig = false ;
266+ const overwriteConfig = flags & InsertFlags . AlternativeOverwriteConfig
267+ ? ! this . _editor . getOption ( EditorOption . suggest ) . overwriteOnAccept
268+ : this . _editor . getOption ( EditorOption . suggest ) . overwriteOnAccept ;
270269
271270 const overwriteBefore = position . column - item . editStart . column ;
272271 const overwriteAfter = ( overwriteConfig ? item . editReplaceEnd . column : item . editInsertEnd . column ) - position . column ;
@@ -533,16 +532,16 @@ KeybindingsRegistry.registerKeybindingRule({
533532 weight
534533} ) ;
535534
536- // // shift+enter and shift+tab use the alternative-flag so that the suggest controller
537- // // is doing the opposite of the editor.suggest.overwriteOnAccept-configuration
538- // KeybindingsRegistry.registerKeybindingRule({
539- // id: 'acceptSelectedSuggestion',
540- // when: ContextKeyExpr.and(SuggestContext.Visible, EditorContextKeys.textInputFocus),
541- // primary: KeyMod.Shift | KeyCode.Tab,
542- // secondary: [KeyMod.Shift | KeyCode.Enter],
543- // args: { alternative: true },
544- // weight
545- // });
535+ // shift+enter and shift+tab use the alternative-flag so that the suggest controller
536+ // is doing the opposite of the editor.suggest.overwriteOnAccept-configuration
537+ KeybindingsRegistry . registerKeybindingRule ( {
538+ id : 'acceptSelectedSuggestion' ,
539+ when : ContextKeyExpr . and ( SuggestContext . Visible , EditorContextKeys . textInputFocus ) ,
540+ primary : KeyMod . Shift | KeyCode . Tab ,
541+ secondary : [ KeyMod . Shift | KeyCode . Enter ] ,
542+ args : { alternative : true } ,
543+ weight
544+ } ) ;
546545
547546// continue to support the old command
548547CommandsRegistry . registerCommandAlias ( 'acceptSelectedSuggestionOnEnter' , 'acceptSelectedSuggestion' ) ;
0 commit comments