mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
parent
44ef5cc531
commit
1b01ed010e
|
@ -114,6 +114,10 @@ export class GhostTextReplacement {
|
|||
get lineCount(): number {
|
||||
return this.newLines.length;
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
return this.parts.every(p => p.lines.length === 0);
|
||||
}
|
||||
}
|
||||
|
||||
export type GhostTextOrReplacement = GhostText | GhostTextReplacement;
|
||||
|
|
|
@ -33,7 +33,7 @@ export class InlineCompletionContextKeys extends Disposable {
|
|||
const suggestion = model?.selectedInlineCompletion.read(reader);
|
||||
const ghostText = model?.ghostText.read(reader);
|
||||
const selectedSuggestItem = model?.selectedSuggestItem.read(reader);
|
||||
this.inlineCompletionVisible.set(selectedSuggestItem === undefined && ghostText !== undefined);
|
||||
this.inlineCompletionVisible.set(selectedSuggestItem === undefined && ghostText !== undefined && !ghostText.isEmpty());
|
||||
|
||||
if (ghostText && suggestion) {
|
||||
this.suppressSuggestions.set(suggestion.inlineCompletion.source.inlineCompletions.suppressSuggestions);
|
||||
|
|
Loading…
Reference in a new issue