Implement terminal kill

This commit is contained in:
Daniel Imms
2016-09-10 20:05:09 -07:00
parent c80c9ce39c
commit 983cf3b921
4 changed files with 68 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import {ITerminalService, TERMINAL_PANEL_ID} from 'vs/workbench/parts/terminal/electron-browser/terminal';
import {ITerminalService} from 'vs/workbench/parts/terminal/electron-browser/terminal';
import {IPanelService} from 'vs/workbench/services/panel/common/panelService';
import {IPartService} from 'vs/workbench/services/part/common/partService';
import {MainThreadTerminalServiceShape} from './extHost.protocol';
@@ -33,10 +33,7 @@ export class MainThreadTerminalService extends MainThreadTerminalServiceShape {
public $hide(terminalId: number): void {
if (this.terminalService.getActiveInstance().id === terminalId) {
const panel = this.panelService.getActivePanel();
if (panel && panel.getId() === TERMINAL_PANEL_ID) {
this.partService.setPanelHidden(true);
}
this.terminalService.hidePanel();
}
}