Change:
}); }); }); <ins> test('Completion list closes unexpectedly when typing a digit after a word separator #169390', function () { const requestCounts = [0, 0]; disposables.add(registry.register({ scheme: 'test' }, { provideCompletionItems(doc, pos) { requestCounts[0] += 1; return { suggestions: [{ kind: CompletionItemKind.Text, label: 'foo-20', insertText: 'foo-20', range: new Range(pos.lineNumber, 1, pos.lineNumber, pos.column) }, { kind: CompletionItemKind.Text, label: 'foo-hello', insertText: 'foo-hello', range: new Range(pos.lineNumber, 1, pos.lineNumber, pos.column) }], }; } })); disposables.add(registry.register({ scheme: 'test' }, { triggerCharacters: ['2'], provideCompletionItems(doc, pos, ctx) { requestCounts[1] += 1; if (ctx.triggerKind !== CompletionTriggerKind.TriggerCharacter) { return; } return { suggestions: [{ kind: CompletionItemKind.Class, label: 'foo-210', insertText: 'foo-210', range: new Range(pos.lineNumber, 1, pos.lineNumber, pos.column) }], }; }, })); return withOracle(async function (model, editor) { await assertEvent(model.onDidSuggest, () => { editor.setValue('foo'); editor.setSelection(new Selection(1, 4, 1, 4)); model.trigger({ auto: false }); }, event => { assert.strictEqual(event.auto, false); assert.strictEqual(event.completionModel.items.length, 2); assert.strictEqual(event.completionModel.items[0].textLabel, 'foo-20'); assert.strictEqual(event.completionModel.items[1].textLabel, 'foo-hello'); }); editor.trigger('keyboard', Handler.Type, { text: '-' }); await assertEvent(model.onDidSuggest, () => { editor.trigger('keyboard', Handler.Type, { text: '2' }); }, event => { assert.strictEqual(event.auto, true); assert.strictEqual(event.completionModel.items.length, 2); assert.strictEqual(event.completionModel.items[0].textLabel, 'foo-20'); assert.strictEqual(event.completionModel.items[1].textLabel, 'foo-210'); assert.deepStrictEqual(requestCounts, [1, 2]); }); }); }); </ins> });

Discussion:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.74.1 (Universal) and 1.75.0-insider (Universal) OS Version: macOS 12.5.1 Steps to Reproduce: the extension in VS Code and run the "Run Extension" task from the "Run and Debug" panel a new untitled file and change the language to "TypeScript JSX" the file contents to the cursor in between the quotes: completions manually should see two completions provided by the extension, and this point the completions should still be visible this point the completion list should still be open, but it has closed you type instead of then the list stays open as expected This behaviour seems to have changed recently because it worked as expected in the September release (and maybe the October one?)
I can reproduce but I am not quite sure what's happening. It seems like typing is understood as entering a new word and retriggering completions. That carries over the existing items (foo-20 and foo-hello) and they should be kept stable. However, the also seems to be a trigger character which cancels the pending request, loses the in-flight items, and retriggers only for the provider that is triggered by that character
Emmet is the provider that is triggered by the 2. <img width="808" alt="Screenshot 2022-12-16 at 13 44 33" src="https://user-"