Skip to content

Commit 093743e

Browse files
author
Akash Satheesan
committed
fix(.../platform/terminal): fix compile, add notes
1 parent f472b00 commit 093743e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/vscode/src/vs/platform/terminal/node/ptyService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ export class PtyService extends Disposable implements IPtyService {
7878
throw new Error('Attempt to create a process when attach object was provided');
7979
}
8080
const id = ++this._lastPtyId;
81-
const process = new TerminalProcess(shellLaunchConfig, cwd, cols, rows, env, executableEnv, windowsEnableConpty, this._logService);
81+
/**
82+
* NOTE@coder: pass ID into TerminalProcess to fix compile.
83+
*/
84+
const process = new TerminalProcess(id, shellLaunchConfig, cwd, cols, rows, env, executableEnv, windowsEnableConpty, this._logService);
8285
process.onProcessData(event => this._onProcessData.fire({ id, event }));
8386
process.onProcessExit(event => this._onProcessExit.fire({ id, event }));
8487
if (process.onProcessOverrideDimensions) {
@@ -328,7 +331,7 @@ export class PersistentTerminalProcess extends Disposable {
328331
}
329332
return undefined;
330333
}
331-
shutdown(immediate: boolean): Promise<void> {
334+
shutdown(immediate: boolean): void {
332335
return this._terminalProcess.shutdown(immediate);
333336
}
334337
input(data: string): void {

lib/vscode/src/vs/platform/terminal/node/terminalProcess.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
5050
private _exitCode: number | undefined;
5151
private _exitMessage: string | undefined;
5252
private _closeTimeout: any;
53+
/**
54+
* NOTE@coder: set _ptyProcess and _currentTitle to protected
55+
* to allow access from subclasses.
56+
*
57+
* We subclass it in src/vs/server/channel.ts
58+
*/
5359
protected _ptyProcess: pty.IPty | undefined;
5460
protected _currentTitle: string = '';
5561
private _processStartupComplete: Promise<void> | undefined;
@@ -80,6 +86,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
8086
private readonly _onProcessShellTypeChanged = this._register(new Emitter<TerminalShellType>());
8187
public readonly onProcessShellTypeChanged = this._onProcessShellTypeChanged.event;
8288

89+
// NOTE@coder: add id to constructor
8390
constructor(
8491
public readonly id: number = 0,
8592
private readonly _shellLaunchConfig: IShellLaunchConfig,

0 commit comments

Comments
 (0)