mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 2e5312cd61ff99c570299ecc122c52584265eda2
This commit is contained in:
committed by
Anthony Dresser
parent
3603f55d97
commit
7f1d8fc32f
@@ -297,6 +297,13 @@ export class TerminalService implements ITerminalService {
|
||||
return tab.activeInstance;
|
||||
}
|
||||
|
||||
public doWithActiveInstance<T>(callback: (terminal: ITerminalInstance) => T): T | void {
|
||||
const instance = this.getActiveInstance();
|
||||
if (instance) {
|
||||
return callback(instance);
|
||||
}
|
||||
}
|
||||
|
||||
public getInstanceFromId(terminalId: number): ITerminalInstance | undefined {
|
||||
let bgIndex = -1;
|
||||
this._backgroundedTerminalInstances.forEach((terminalInstance, i) => {
|
||||
@@ -694,10 +701,10 @@ export class TerminalService implements ITerminalService {
|
||||
|
||||
public hidePanel(): void {
|
||||
// Hide the panel if the terminal is in the panel and it has no sibling views
|
||||
const location = this._viewDescriptorService.getViewLocation(TERMINAL_VIEW_ID);
|
||||
const location = this._viewDescriptorService.getViewLocationById(TERMINAL_VIEW_ID);
|
||||
if (location === ViewContainerLocation.Panel) {
|
||||
const panel = this._viewDescriptorService.getViewContainer(TERMINAL_VIEW_ID);
|
||||
if (panel && this._viewDescriptorService.getViewDescriptors(panel).activeViewDescriptors.length === 1) {
|
||||
const panel = this._viewDescriptorService.getViewContainerByViewId(TERMINAL_VIEW_ID);
|
||||
if (panel && this._viewDescriptorService.getViewContainerModel(panel).activeViewDescriptors.length === 1) {
|
||||
this._layoutService.setPanelHidden(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user