Skip to content

Commit 3c36ebb

Browse files
committed
Clear the viewer pane once the process stops
1 parent e8b6b5c commit 3c36ebb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/workbench/contrib/positronPreview/browser/components/urlActionBars.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ export const UrlActionBars = (props: PropsWithChildren<UrlActionBarsProps>) => {
238238
// Reset interrupting state when child processes stop
239239
if (!hasChildProcesses) {
240240
setInterrupting(false);
241+
// Clear the viewer when the process stops
242+
services.positronPreviewService.clearAllPreviews();
241243
// Clear the source terminal when processes stop
242244
setSourceTerminal(undefined);
243245
}
@@ -254,7 +256,7 @@ export const UrlActionBars = (props: PropsWithChildren<UrlActionBarsProps>) => {
254256
);
255257

256258
return () => disposables.dispose();
257-
}, [sourceTerminal]);
259+
}, [sourceTerminal, services.positronPreviewService]);
258260

259261
// Render.
260262
return (
@@ -295,7 +297,6 @@ export const UrlActionBars = (props: PropsWithChildren<UrlActionBarsProps>) => {
295297
onPressed={interruptHandler}>
296298
<div className='action-bar-button-icon interrupt codicon codicon-positron-interrupt-runtime' />
297299
</ActionBarButton>
298-
<ActionBarSeparator />
299300
</>
300301
)}
301302
<ActionBarButton

0 commit comments

Comments
 (0)