Add Terminal.sendText API

This commit is contained in:
Daniel Imms
2016-08-17 13:59:56 -07:00
parent cce4650a6b
commit 734f91b5de
5 changed files with 34 additions and 14 deletions

View File

@@ -24,12 +24,15 @@ export class MainThreadTerminalService extends MainThreadTerminalServiceShape {
}
public $show(terminalId: number, preserveFocus: boolean): void {
this._terminalService.show(!preserveFocus, terminalId);
this._terminalService.show(!preserveFocus).then((terminalPanel) => {
terminalPanel.setActiveTerminalById(terminalId);
});
}
public $sendText(terminalId: number, text: string, addNewLine: boolean): void {
this._terminalService.show(false, terminalId).then((terminalPanel) => {
// TODO: Implement
this._terminalService.show(false).then((terminalPanel) => {
terminalPanel.setActiveTerminalById(terminalId);
terminalPanel.sendTextToActiveTerminal(text, addNewLine);
});
}
}