Skip to content

Commit 10efd9f

Browse files
authored
feat: disable visualizer reload on save (#281)
* feat: make auto reload of visualizer on save optional * Remove user setting for Event Visualizer * Remove yml file
1 parent 43404e1 commit 10efd9f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/extension.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as vscode from 'vscode';
22
import { isAsyncAPIFile, openAsyncAPI, openAsyncapiFiles, previewAsyncAPI } from './PreviewWebPanel';
33
import { asyncapiSmartPaste } from './SmartPasteCommand';
4-
import { visualizeAsyncApi } from './Visualizer';
4+
import { visualizeAsyncApi,openVisualizerFiles } from './Visualizer';
55
import { visualizeAsyncApiFocus } from './ApplicationFocusView';
66

77

@@ -33,8 +33,9 @@ export function activate(context: vscode.ExtensionContext) {
3333
if (vscode.window.activeTextEditor?.document) {
3434
setAsyncAPIPreviewContext(vscode.window.activeTextEditor.document);
3535
}
36-
if (isAsyncAPIFile(document)) {
37-
visualizeAsyncApi(context)(document.uri); // Automatically reload the visualizer for the file
36+
if (isAsyncAPIFile(document) && openVisualizerFiles[document.uri.fsPath]) {
37+
visualizeAsyncApi(context)(document.uri); // Automatically reload the visualizer for the file
38+
3839
}
3940
});
4041

0 commit comments

Comments
 (0)