Skip to content

Commit f4ae575

Browse files
only close interactive session on interactive window close (#11405) (#11437)
* only close interactive session on interactive window close (#11405)
1 parent 9fad82f commit f4ae575

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
([#11334](https://github.com/Microsoft/vscode-python/issues/11334))
1919
1. Change "python.dataScience.runStartupCommands" commands to be a global setting, not a workspace setting.
2020
([#11352](https://github.com/Microsoft/vscode-python/issues/11352))
21+
1. Closing the interactive window shuts down other active notebook sessions.
22+
([#11404](https://github.com/Microsoft/vscode-python/issues/11404))
2123

2224
### Thanks
2325

src/client/datascience/interactive-common/notebookProvider.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,13 @@ export class NotebookProvider implements INotebookProvider {
281281
}
282282

283283
Array.from(this.notebooks.values()).forEach((promise) => {
284-
promise.then((notebook) => notebook.dispose()).catch(noop);
284+
promise
285+
.then((notebook) => {
286+
if (notebook.identity.scheme === 'history') {
287+
notebook.dispose().ignoreErrors();
288+
}
289+
})
290+
.catch(noop);
285291
});
286292

287293
this.notebooks.clear();

0 commit comments

Comments
 (0)