Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 1 addition & 4 deletions lib/vscode/src/vs/platform/terminal/node/ptyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ export class PtyService extends Disposable implements IPtyService {
throw new Error('Attempt to create a process when attach object was provided');
}
const id = ++this._lastPtyId;
/**
* NOTE@coder: pass ID into TerminalProcess to fix compile.
*/
const process = new TerminalProcess(id, shellLaunchConfig, cwd, cols, rows, env, executableEnv, windowsEnableConpty, this._logService);
const process = new TerminalProcess(shellLaunchConfig, cwd, cols, rows, env, executableEnv, windowsEnableConpty, this._logService);
process.onProcessData(event => this._onProcessData.fire({ id, event }));
process.onProcessExit(event => this._onProcessExit.fire({ id, event }));
if (process.onProcessOverrideDimensions) {
Expand Down
13 changes: 3 additions & 10 deletions lib/vscode/src/vs/platform/terminal/node/terminalProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,16 @@ interface IWriteObject {
}

export class TerminalProcess extends Disposable implements ITerminalChildProcess {
readonly id = 0;
readonly shouldPersist = false;

private static _lastKillOrStart = 0;

private _exitCode: number | undefined;
private _exitMessage: string | undefined;
private _closeTimeout: any;
/**
* NOTE@coder: set _ptyProcess and _currentTitle to protected
* to allow access from subclasses.
*
* We subclass it in src/vs/server/channel.ts
*/
protected _ptyProcess: pty.IPty | undefined;
protected _currentTitle: string = '';
private _ptyProcess: pty.IPty | undefined;
private _currentTitle: string = '';
private _processStartupComplete: Promise<void> | undefined;
private _isDisposed: boolean = false;
private _windowsShellHelper: WindowsShellHelper | undefined;
Expand Down Expand Up @@ -111,9 +106,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
private readonly _onProcessShellTypeChanged = this._register(new Emitter<TerminalShellType>());
public readonly onProcessShellTypeChanged = this._onProcessShellTypeChanged.event;

// NOTE@coder: add id to constructor
constructor(
public readonly id: number = 0,
private readonly _shellLaunchConfig: IShellLaunchConfig,
cwd: string,
cols: number,
Expand Down
Loading