From b9c6d30678653dcb7e6e647a8148b49518ea09e1 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Thu, 29 Jul 2021 21:20:25 +0200 Subject: [PATCH] include titles of all panes in a split tab's title --- tabby-core/src/components/splitTab.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tabby-core/src/components/splitTab.component.ts b/tabby-core/src/components/splitTab.component.ts index 7482310c..742d816f 100644 --- a/tabby-core/src/components/splitTab.component.ts +++ b/tabby-core/src/components/splitTab.component.ts @@ -576,16 +576,20 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit this.layoutInternal(this.root, 0, 0, 100, 100) } + private updateTitle (): void { + this.setTitle(this.getAllTabs().map(x => x.title).join(' | ')) + } + private attachTabView (tab: BaseTabComponent) { const ref = tab.insertIntoContainer(this.viewContainer) this.viewRefs.set(tab, ref) tab.addEventListenerUntilDestroyed(ref.rootNodes[0], 'click', () => this.focus(tab)) - tab.subscribeUntilDestroyed(tab.titleChange$, t => this.setTitle(t)) + tab.subscribeUntilDestroyed(tab.titleChange$, () => this.updateTitle()) tab.subscribeUntilDestroyed(tab.activity$, a => a ? this.displayActivity() : this.clearActivity()) tab.subscribeUntilDestroyed(tab.progress$, p => this.setProgress(p)) if (tab.title) { - this.setTitle(tab.title) + this.updateTitle() } tab.subscribeUntilDestroyed(tab.recoveryStateChangedHint$, () => { this.recoveryStateChangedHint.next()