src/vs/workbench/contrib/terminal/browser/terminalEditorService.ts/TerminalEditorService/_setActiveInstance
class TerminalEditorService:	private _setActiveInstance(instance: ITerminalInstance | undefined): void {
		if (instance === undefined) {
			this._activeInstanceIndex = -1;
		} else {
			this._activeInstanceIndex = this.instances.findIndex(e => e === instance);
		}
		const newActiveInstance = this.activeInstance;
		this._onDidChangeActiveInstance.fire(newActiveInstance);
	}