mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-02 05:51:37 +01:00
* Fixes https://github.com/microsoft/vscode-internalbacklog/issues/5602 * Aligns test
This commit is contained in:
@@ -172,6 +172,7 @@ export class InlineCompletionsModel extends Disposable {
|
||||
changeSummary.changeReason = detailedReasons.length > 0 ? detailedReasons[0].getType() : '';
|
||||
changeSummary.textChange = true;
|
||||
} else if (ctx.didChange(this._forceUpdateExplicitlySignal)) {
|
||||
changeSummary.preserveCurrentCompletion = true;
|
||||
changeSummary.inlineCompletionTriggerKind = InlineCompletionTriggerKind.Explicit;
|
||||
} else if (ctx.didChange(this.dontRefetchSignal)) {
|
||||
changeSummary.dontRefetch = true;
|
||||
|
||||
@@ -340,6 +340,7 @@ suite('Inline Completions', () => {
|
||||
|
||||
test('when accepting word by word', async function () {
|
||||
// The user types the text as suggested and the provider reports a different suggestion.
|
||||
// Even when triggering explicitly, we want to keep the suggestion.
|
||||
|
||||
const provider = new MockInlineCompletionsProvider();
|
||||
await withAsyncTestCodeEditorAndInlineCompletionsModel('',
|
||||
@@ -356,7 +357,7 @@ suite('Inline Completions', () => {
|
||||
|
||||
await ctx.model.triggerExplicitly(); // reset to provider truth
|
||||
await timeout(10000);
|
||||
assert.deepStrictEqual(ctx.context.getAndClearViewStates(), (["foo[ baz]"]));
|
||||
assert.deepStrictEqual(ctx.context.getAndClearViewStates(), ([]));
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user