1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-23 10:32:29 +03:00

include titles of all panes in a split tab's title

This commit is contained in:
Eugene Pankov 2021-07-29 21:20:25 +02:00
parent 009556f984
commit b9c6d30678
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -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()