提交 e417e07b 编写于 作者: D Daniel Imms

Add use conpty setting

上级 d088c4b6
......@@ -406,7 +406,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
// Fork the process and listen for messages
this._logService.debug(`Terminal process launching on ext host`, shellLaunchConfig, initialCwd, cols, rows, env);
this._terminalProcesses[id] = new TerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env);
this._terminalProcesses[id] = new TerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, terminalConfig.get('experimentalUseConpty'));
this._terminalProcesses[id].onProcessIdReady(pid => this._proxy.$sendProcessPid(id, pid));
this._terminalProcesses[id].onProcessTitleChanged(title => this._proxy.$sendProcessTitle(id, title));
this._terminalProcesses[id].onProcessData(data => this._proxy.$sendProcessData(id, data));
......
......@@ -102,6 +102,7 @@ export interface ITerminalConfiguration {
showExitAlert: boolean;
experimentalBufferImpl: 'JsArray' | 'TypedArray';
splitCwd: 'workspaceRoot' | 'initial' | 'inherited';
experimentalUseConpty: boolean;
}
export interface ITerminalConfigHelper {
......
......@@ -397,6 +397,11 @@ configurationRegistry.registerConfiguration({
],
default: 'inherited'
},
'terminal.integrated.experimentalUseConpty': {
description: nls.localize('terminal.integrated.experimentalUseConpty', "Whether to enable conpty on Windows 10 (needs >= 17692). Winpty will be used if this is false."),
type: 'boolean',
default: false
}
}
});
......
......@@ -122,7 +122,7 @@ export class TerminalProcessManager implements ITerminalProcessManager {
terminalEnvironment.addTerminalEnvironmentKeys(env, locale);
this._logService.debug(`Terminal process launching`, shellLaunchConfig, this.initialCwd, cols, rows, env);
this._process = new TerminalProcess(shellLaunchConfig, this.initialCwd, cols, rows, env);
this._process = new TerminalProcess(shellLaunchConfig, this.initialCwd, cols, rows, env, this._configHelper.config.experimentalUseConpty);
}
this.processState = ProcessState.LAUNCHING;
......
......@@ -35,7 +35,8 @@ export class TerminalProcess implements ITerminalChildProcess, IDisposable {
cwd: string,
cols: number,
rows: number,
env: platform.IProcessEnvironment
env: platform.IProcessEnvironment,
useConpty: boolean
) {
let shellName: string;
if (os.platform() === 'win32') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册