Skip to content

Commit 6b9b146

Browse files
committed
now test the terminal state :)
1 parent 5e8f779 commit 6b9b146

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/client/common/terminal/service.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License.
33

44
import { inject, injectable } from 'inversify';
5-
import { CancellationToken, Disposable, Event, EventEmitter, Terminal, TerminalShellExecution } from 'vscode';
5+
import { window, CancellationToken, Disposable, Event, EventEmitter, Terminal, TerminalShellExecution } from 'vscode';
66
import '../../common/extensions';
77
import { IInterpreterService } from '../../interpreter/contracts';
88
import { IServiceContainer } from '../../ioc/types';
@@ -88,6 +88,11 @@ export class TerminalService implements ITerminalService, Disposable {
8888
terminal.show(true);
8989
}
9090

91+
window.onDidChangeTerminalState((e) => {
92+
const ourTerminalState = e.state;
93+
console.log(ourTerminalState);
94+
traceVerbose('Printing our terminal state from service.ts', ourTerminalState);
95+
});
9196
// If terminal was just launched, wait some time for shell integration to onDidChangeShellIntegration.
9297
if (!terminal.shellIntegration && this._terminalFirstLaunched) {
9398
this._terminalFirstLaunched = false;
@@ -96,6 +101,7 @@ export class TerminalService implements ITerminalService, Disposable {
96101
clearTimeout(timer);
97102
disposable.dispose();
98103
resolve(true);
104+
99105
const shellIntegration = (terminal.shellIntegration as unknown) as { env: any };
100106
const tempEnv = shellIntegration.env;
101107
console.log(tempEnv);

0 commit comments

Comments
 (0)