mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
don't add inlineCompletionItem to model unless it's supported (#253886)
fix #252367
This commit is contained in:
@@ -342,11 +342,13 @@ export class SuggestAddon extends Disposable implements ITerminalAddon, ISuggest
|
||||
}
|
||||
|
||||
const lineContext = new LineContext(normalizedLeadingLineContent, this._cursorIndexDelta);
|
||||
const items = completions.filter(c => !!c.label).map(c => new TerminalCompletionItem(c));
|
||||
if (isInlineCompletionSupported(this.shellType)) {
|
||||
items.push(this._inlineCompletionItem);
|
||||
}
|
||||
|
||||
const model = new TerminalCompletionModel(
|
||||
[
|
||||
...completions.filter(c => !!c.label).map(c => new TerminalCompletionItem(c)),
|
||||
this._inlineCompletionItem,
|
||||
],
|
||||
items,
|
||||
lineContext
|
||||
);
|
||||
if (token.isCancellationRequested) {
|
||||
|
||||
Reference in New Issue
Block a user