mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-23 05:10:30 -04:00
Merge from vscode de81ccf04849309f843db21130c806a5783678f7 (#4738)
This commit is contained in:
@@ -426,16 +426,23 @@ export class TerminalInstance implements ITerminalInstance {
|
||||
this._xterm.on('key', (key, ev) => this._onKey(key, ev));
|
||||
|
||||
if (this._processManager) {
|
||||
if (this._processManager.os === platform.OperatingSystem.Windows) {
|
||||
this._xterm.winptyCompatInit();
|
||||
}
|
||||
this._processManager.onProcessData(data => this._onProcessData(data));
|
||||
this._xterm.on('data', data => this._processManager!.write(data));
|
||||
// TODO: How does the cwd work on detached processes?
|
||||
this._linkHandler = this._instantiationService.createInstance(TerminalLinkHandler, this._xterm, platform.platform, this._processManager);
|
||||
this.processReady.then(async () => {
|
||||
this._linkHandler.processCwd = await this._processManager!.getInitialCwd();
|
||||
});
|
||||
// Init winpty compat and link handler after process creation as they rely on the
|
||||
// underlying process OS
|
||||
this._processManager.onProcessReady(() => {
|
||||
if (!this._processManager) {
|
||||
return;
|
||||
}
|
||||
if (this._processManager.os === platform.OperatingSystem.Windows) {
|
||||
this._xterm.winptyCompatInit();
|
||||
}
|
||||
this._linkHandler = this._instantiationService.createInstance(TerminalLinkHandler, this._xterm, platform.platform, this._processManager);
|
||||
});
|
||||
}
|
||||
this._xterm.on('focus', () => this._onFocus.fire(this));
|
||||
|
||||
@@ -579,7 +586,7 @@ export class TerminalInstance implements ITerminalInstance {
|
||||
|
||||
if (this._processManager) {
|
||||
this._widgetManager = new TerminalWidgetManager(this._wrapperElement);
|
||||
this._linkHandler.setWidgetManager(this._widgetManager);
|
||||
this._processManager.onProcessReady(() => this._linkHandler.setWidgetManager(this._widgetManager));
|
||||
}
|
||||
|
||||
const computedStyle = window.getComputedStyle(this._container);
|
||||
|
||||
Reference in New Issue
Block a user