diff --git a/package.json b/package.json index 3744b0b..10be8e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fabelous-autocoder", - "version": "0.2.61", + "version": "0.2.74", "displayName": "Fabelous Autocoder", "description": "A simple to use Ollama autocompletion Plugin", "icon": "icon.png", diff --git a/src/extension.ts b/src/extension.ts index f37b3df..ac30149 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -178,7 +178,7 @@ async function autocompleteCommand(textEditor: vscode.TextEditor, cancellationTo const insertText = completionText + '\n'.repeat(Math.max(0, totalNewLines - completionLineCount)); // Replace the context with the new text - const replaceRange = new vscode.Range(startLine, 0, position.line + 1, 0); + const replaceRange = new vscode.Range(startLine, 0, position.line, 0); edit.replace(document.uri, replaceRange, insertText); await vscode.workspace.applyEdit(edit);