From 2ac798e3aa3a7ac8746b2aba4b298bc5169e89e8 Mon Sep 17 00:00:00 2001 From: vinzbarbuto Date: Thu, 3 Oct 2024 12:06:10 -0700 Subject: [PATCH] Prevent file save on import addition to avoid tree view refreshes --- src/lfview/lf-data-provider.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lfview/lf-data-provider.ts b/src/lfview/lf-data-provider.ts index 274bb0276..96e6c960b 100644 --- a/src/lfview/lf-data-provider.ts +++ b/src/lfview/lf-data-provider.ts @@ -720,7 +720,6 @@ export class LFDataProvider implements vscode.TreeDataProvider { - const document = editor.document; try { - const success = await editor.edit(editBuilder => { + await editor.edit(editBuilder => { editBuilder.insert(new vscode.Position(idx, 0), importText); }); - if (success) { - await document.save(); - } } catch (error) { console.error('Failed to add text or save document:', error); }