Skip to content

Commit

Permalink
fixed #9829 - show the active pane's title as the first in the split …
Browse files Browse the repository at this point in the history
…tab title
  • Loading branch information
Eugeny committed Aug 24, 2024
1 parent f4992c3 commit 0241623
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tabby-core/src/components/splitTab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,13 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
if (this.disableDynamicTitle) {
return
}
this.setTitle([...new Set(this.getAllTabs().map(x => x.title))].join(' | '))
const titles = [
this.getFocusedTab()?.title,
...this.getAllTabs()
.filter(x => x !== this.getFocusedTab())
.map(x => x.title),
]
this.setTitle([...new Set(titles)].join(' | '))
}

private attachTabView (tab: BaseTabComponent) {
Expand All @@ -837,6 +843,10 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
})
}

tab.subscribeUntilDestroyed(
this.observeUntilChildDetached(tab, tab.focused$),
() => this.updateTitle(),
)
tab.subscribeUntilDestroyed(
this.observeUntilChildDetached(tab, tab.titleChange$),
() => this.updateTitle(),
Expand Down

0 comments on commit 0241623

Please sign in to comment.