not working multi line support

This commit is contained in:
Falko Victor Habel 2024-09-11 09:54:28 +02:00
parent 8ac3879ee0
commit 77e0dbc048
1 changed files with 9 additions and 4 deletions

View File

@ -113,8 +113,13 @@ async function autocompleteCommand(textEditor: vscode.TextEditor, cancellationTo
// Create a decoration for each line of the response // Create a decoration for each line of the response
const previewRanges = lines.map((line: string, idx: number) => { const previewRanges = lines.map((line: string, idx: number) => {
const linePos = new vscode.Position(position.line + idx, 0); // Determine the start and end positions for each line
const range = new vscode.Range(linePos, linePos); // Set range at the start of each new line const startPos = new vscode.Position(position.line + idx, 0);
const endPos = new vscode.Position(position.line + idx, line.length);
// Create a range covering the whole line
const range = new vscode.Range(startPos, endPos);
return { return {
range, range,
renderOptions: { renderOptions: {