Skip to content

Commit f93f3a5

Browse files
committed
Handle non-persistent terminals
1 parent df4c1ab commit f93f3a5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ci/dev/vscode.patch

+10
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,7 @@ index 0000000000000000000000000000000000000000..cb3a45fda10a6bcbff73275b5734641b
18801880
+ private _title: string = "";
18811881
+ public readonly workspaceId: string;
18821882
+ public readonly workspaceName: string;
1883+
+ private readonly persist: boolean;
18831884
+
18841885
+ private readonly _onDispose = new Emitter<void>();
18851886
+ public get onDispose(): Event<void> { return this._onDispose.event; }
@@ -1918,6 +1919,13 @@ index 0000000000000000000000000000000000000000..cb3a45fda10a6bcbff73275b5734641b
19181919
+ data: this.replayData.join(""),
19191920
+ }]
19201921
+ });
1922+
+ },
1923+
+
1924+
+ onLastListenerRemove: () => {
1925+
+ logger.debug('Terminal unbound', field('id', this.id));
1926+
+ if (!this.persist) { // Used by debug consoles.
1927+
+ this.dispose();
1928+
+ }
19211929
+ }
19221930
+ });
19231931
+
@@ -1979,6 +1987,8 @@ index 0000000000000000000000000000000000000000..cb3a45fda10a6bcbff73275b5734641b
19791987
+ this.cols = args.cols;
19801988
+ this.rows = args.rows;
19811989
+
1990+
+ this.persist = args.shouldPersistTerminal;
1991+
+
19821992
+ this.process = new TerminalProcess(
19831993
+ config,
19841994
+ config.cwd,

0 commit comments

Comments
 (0)