From 439a538c7e2ffec71f1652f9e065979bfad9c830 Mon Sep 17 00:00:00 2001 From: Falko Habel Date: Wed, 9 Oct 2024 14:24:53 +0200 Subject: [PATCH] bug fix for lines add extra lines before inserting --- src/extension.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/extension.ts b/src/extension.ts index facecec..3790c1b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -100,7 +100,9 @@ class CompletionManager { } public async showPreview() { + this.completionText = '\n' + this.completionText; const completionLines = this.completionText.split('\n'); + const emptyLine = ''; // Empty line for spacing const previewLines = [emptyLine, ...completionLines, emptyLine]; @@ -166,6 +168,7 @@ async function autocompleteCommand(textEditor: vscode.TextEditor, edit: vscode.T console.log('Completion generated:', completionText); + const completionManager = new CompletionManager(textEditor, position, completionText); await completionManager.showPreview(); activeCompletionManager = completionManager;