mirror of
https://github.com/microsoft/vscode.git
synced 2026-06-02 21:55:33 +01:00
Don't compute ghost text that is not supported. Thus, no space is reserved for unsupported ghost text.
This commit is contained in:
@@ -434,11 +434,17 @@ export function inlineCompletionToGhostText(inlineCompletion: NormalizedInlineCo
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const position = inlineCompletion.range.getEndPosition();
|
||||
const lines = strings.splitLines(inlineCompletion.text.substr(valueToBeReplaced.length));
|
||||
|
||||
if (lines.length > 1 && textModel.getLineMaxColumn(position.lineNumber) !== position.column) {
|
||||
// Such ghost text is not supported.
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
lines,
|
||||
position: inlineCompletion.range.getEndPosition()
|
||||
position
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user