mirror of
https://github.com/Microsoft/vscode
synced 2024-10-01 08:50:48 +00:00
This commit is contained in:
parent
f80875f681
commit
e3b7a27662
|
@ -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';
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue