Skip to content

Commit

Permalink
Merge pull request #62 from EDAcation:fix/editors-unloading
Browse files Browse the repository at this point in the history
views: Do not unload when navigating away
  • Loading branch information
malmeloo authored May 1, 2024
2 parents 8477379 + 34f39e6 commit 6e828f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e828f9

Please sign in to comment.