mirror of
https://github.com/Eugeny/tabby
synced 2024-12-04 18:40:16 +00:00
fixed #9829 - show the active pane's title as the first in the split tab title
This commit is contained in:
parent
f4992c3f70
commit
0241623d27
1 changed files with 11 additions and 1 deletions
|
@ -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) {
|
||||
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue