Skip to content

Commit

Permalink
fix #181407
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed May 27, 2024
1 parent f80875f commit 8e56ca5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Range } from 'vs/editor/common/core/range';
import { Selection } from 'vs/editor/common/core/selection';
import { SingleTextEdit, TextEdit } from 'vs/editor/common/core/textEdit';
import { TextLength } from 'vs/editor/common/core/textLength';
import { ScrollType } from 'vs/editor/common/editorCommon';
import { Command, InlineCompletionContext, InlineCompletionTriggerKind, PartialAcceptTriggerKind } from 'vs/editor/common/languages';
import { ILanguageConfigurationService } from 'vs/editor/common/languages/languageConfigurationRegistry';
import { EndOfLinePreference, ITextModel } from 'vs/editor/common/model';
Expand Down Expand Up @@ -444,6 +445,7 @@ export class InlineCompletionsModel extends Disposable {
const selections = getEndPositionsAfterApplying(edits).map(p => Selection.fromPositions(p));
editor.executeEdits('inlineSuggestion.accept', edits.map(edit => EditOperation.replace(edit.range, edit.text)));
editor.setSelections(selections, 'inlineCompletionPartialAccept');
editor.revealPositionInCenterIfOutsideViewport(editor.getPosition()!, ScrollType.Immediate);
} finally {
this._isAcceptingPartially = false;
}
Expand Down

0 comments on commit 8e56ca5

Please sign in to comment.