mirror of
https://github.com/Microsoft/vscode
synced 2024-10-04 02:14:06 +00:00
Merge pull request #180403 from microsoft/hediet/b/ideological-wasp
Removes unneeded additionalReservedLineCount from GhostText
This commit is contained in:
commit
3f6a54de51
|
@ -10,7 +10,6 @@ export class GhostText {
|
|||
constructor(
|
||||
public readonly lineNumber: number,
|
||||
public readonly parts: GhostTextPart[],
|
||||
public readonly additionalReservedLineCount: number = 0
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ export class GhostTextWidget extends Disposable {
|
|||
additionalLines,
|
||||
hiddenRange,
|
||||
lineNumber: ghostText.lineNumber,
|
||||
additionalReservedLineCount: ghostText.additionalReservedLineCount,
|
||||
additionalReservedLineCount: this.model.minReservedLineCount.read(reader),
|
||||
targetTextModel: textModel,
|
||||
};
|
||||
});
|
||||
|
|
|
@ -187,7 +187,7 @@ export class InlineCompletionsModel extends Disposable {
|
|||
const newGhostText = edit.computeGhostText(model, mode, cursor, editPreviewLength);
|
||||
|
||||
// Show an invisible ghost text to reserve space
|
||||
return newGhostText ?? new GhostText(edit.range.endLineNumber, [], 0);
|
||||
return newGhostText ?? new GhostText(edit.range.endLineNumber, []);
|
||||
} else {
|
||||
if (!this._isActive.read(reader)) { return undefined; }
|
||||
const item = this.selectedInlineCompletion.read(reader);
|
||||
|
|
|
@ -140,7 +140,7 @@ export class SingleTextEdit {
|
|||
}
|
||||
}
|
||||
|
||||
return new GhostText(lineNumber, parts, 0);
|
||||
return new GhostText(lineNumber, parts);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue