Skip to content

Commit 3a1f253

Browse files
committed
Open output file after exporting
1 parent 603d6b1 commit 3a1f253

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/App.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Viewer from './Viewer';
44
import { ErrorBoundary } from 'react-error-boundary';
55
import { vscode } from './vscode-api';
66
import { MessageType, type Message, type FileInfo } from '../src/models';
7-
import { H5WasmLocalFileProvider } from '@h5web/h5wasm';
87
import StandaloneViewer from './StandaloneViewer';
98

109
// 2 GB = 2 * 1024 * 1024 * 1024 B

src/H5WebViewer.ts

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
Uri,
66
Webview,
77
WebviewPanel,
8+
commands,
89
window,
910
workspace,
1011
} from 'vscode';
@@ -82,6 +83,10 @@ export default class H5WebViewer
8283

8384
if (saveUri) {
8485
writeFileSync(saveUri.fsPath, payload);
86+
87+
// Open output file in separate editor
88+
commands.executeCommand('workbench.action.keepEditor'); // if current editor is in preview mode, keep it open
89+
window.showTextDocument(saveUri);
8590
}
8691

8792
return;

0 commit comments

Comments
 (0)