提交 7da67914 编写于 作者: D Daniel Imms

Give cols/rows to createProcess

上级 ade7f5e8
......@@ -473,7 +473,7 @@ export interface ITerminalProcessManager extends IDisposable {
initialCwd: string;
addDisposable(disposable: IDisposable);
createProcess(shellLaunchConfig: IShellLaunchConfig);
createProcess(shellLaunchConfig: IShellLaunchConfig, cols: number, rows: number);
write(data: string): void;
}
......
......@@ -434,7 +434,7 @@ export class TerminalInstance implements ITerminalInstance {
}
}
get selection(): string | undefined {
public get selection(): string | undefined {
return this.hasSelection() ? this._xterm.getSelection() : undefined;
}
......@@ -591,9 +591,9 @@ export class TerminalInstance implements ITerminalInstance {
protected _createProcess(): void {
// TODO: This should be injected in to the terminal instance (from service?)
this._processManager = this._instantiationService.createInstance(TerminalProcessManager, this._configHelper, this._cols, this._rows);
this._processManager = this._instantiationService.createInstance(TerminalProcessManager, this._configHelper);
this._processManager.onShellProcessIdReady(() => this._onProcessIdReady.fire(this));
this._processManager.createProcess(this._shellLaunchConfig);
this._processManager.createProcess(this._shellLaunchConfig, this._cols, this._rows);
if (this._shellLaunchConfig.name) {
this.setTitle(this._shellLaunchConfig.name, false);
......
......@@ -45,8 +45,6 @@ export class TerminalProcessManager implements ITerminalProcessManager {
constructor(
private _configHelper: ITerminalConfigHelper,
private _cols: number,
private _rows: number,
@IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService,
@IHistoryService private readonly _historyService: IHistoryService,
@IConfigurationResolverService private readonly _configurationResolverService: IConfigurationResolverService,
......@@ -63,7 +61,11 @@ export class TerminalProcessManager implements ITerminalProcessManager {
this._disposables.push(disposable);
}
public createProcess(shellLaunchConfig: IShellLaunchConfig): void {
public createProcess(
shellLaunchConfig: IShellLaunchConfig,
cols: number,
rows: number
): void {
this.ptyProcessReady = new TPromise<void>(c => {
this.onShellProcessIdReady(() => {
this._logService.debug(`Terminal process ready (shellProcessId: ${this.shellProcessId})`);
......@@ -92,7 +94,7 @@ export class TerminalProcessManager implements ITerminalProcessManager {
// Continue env initialization, merging in the env from the launch
// config and adding keys that are needed to create the process
const env = TerminalProcessManager.createTerminalEnv(parentEnv, shellLaunchConfig, this.initialCwd, locale, this._cols, this._rows);
const env = TerminalProcessManager.createTerminalEnv(parentEnv, shellLaunchConfig, this.initialCwd, locale, cols, rows);
const cwd = Uri.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath;
const options = { env, cwd };
this._logService.debug(`Terminal process launching`, options);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册