Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Added support for Positron's statement execution feature that reports the approximate line number of the parse error (<https://github.com/quarto-dev/quarto/pull/919>).
- Fixed a bug where `Quarto: Format Cell` would notify you that no formatter was available for code cells that were already formatted (<https://github.com/quarto-dev/quarto/pull/933>).
- No longer claim `.typ` files. Typst syntax highlighting in Quarto documents is unaffected, but standalone Typst files are now left to dedicated extensions like Tinymist (<https://github.com/quarto-dev/quarto/pull/943>).
- Fixed a bug where closing the Quarto Preview terminal via the trash icon did not clean up intermediate `.quarto_ipynb` files (<https://github.com/quarto-dev/quarto/pull/947>).

## 1.130.0 (Release on 2026-02-18)

Expand Down
15 changes: 15 additions & 0 deletions apps/vscode/src/providers/preview/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,18 @@ class PreviewManager {
this.outputSink_,
this.renderToken_
);

// When the user closes the preview terminal via the trash icon (or any
// external means), send the HTTP termination request so Quarto can clean
// up temp files (e.g. _ipynb files created during Python preview).
context.subscriptions.push(
vscode.window.onDidCloseTerminal(async (closedTerminal) => {
if (closedTerminal === this.terminal_) {
this.terminal_ = undefined;
await this.previewTerminateRequest();
}
})
);
}

dispose() {
Expand Down Expand Up @@ -416,6 +428,9 @@ class PreviewManager {
}

private async killPreview() {
// Clear this.terminal_ before disposing so the onDidCloseTerminal listener
// does not send a duplicate termination request.
this.terminal_ = undefined;
await killTerminal(kPreviewWindowTitle, async () => await this.previewTerminateRequest());
this.progressDismiss();
this.progressCancellationToken_ = undefined;
Expand Down
Loading