From 6dd5328603bbf5f967ad901c8ef725e48dc763ce Mon Sep 17 00:00:00 2001 From: Mike A Date: Mon, 29 Apr 2024 23:46:01 +0200 Subject: [PATCH] views: Do not unload when navigating away --- src/extension/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/extension/index.ts b/src/extension/index.ts index 518ff78..fb7ab49 100644 --- a/src/extension/index.ts +++ b/src/extension/index.ts @@ -22,7 +22,11 @@ export const activate = async (context: vscode.ExtensionContext) => { // Register custom editors for (const editorType of Object.values(editors)) { const editor = new editorType(context, projects); - context.subscriptions.push(vscode.window.registerCustomEditorProvider(editorType.getViewType(), editor)); + context.subscriptions.push( + vscode.window.registerCustomEditorProvider(editorType.getViewType(), editor, { + webviewOptions: {retainContextWhenHidden: true} + }) + ); } // Register task providers