mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-17 01:50:05 +00:00
duplicate tab placement (fixes #2062)
This commit is contained in:
parent
2094c44992
commit
b97149aa73
@ -98,8 +98,13 @@ export class AppService {
|
|||||||
}, 30000)
|
}, 30000)
|
||||||
}
|
}
|
||||||
|
|
||||||
addTabRaw (tab: BaseTabComponent) {
|
addTabRaw (tab: BaseTabComponent, index: number|null = null) {
|
||||||
|
if (index !== null) {
|
||||||
|
this.tabs.splice(index, 0, tab)
|
||||||
|
} else {
|
||||||
this.tabs.push(tab)
|
this.tabs.push(tab)
|
||||||
|
}
|
||||||
|
|
||||||
this.selectTab(tab)
|
this.selectTab(tab)
|
||||||
this.tabsChanged.next()
|
this.tabsChanged.next()
|
||||||
this.tabOpened.next(tab)
|
this.tabOpened.next(tab)
|
||||||
@ -232,7 +237,7 @@ export class AppService {
|
|||||||
async duplicateTab (tab: BaseTabComponent) {
|
async duplicateTab (tab: BaseTabComponent) {
|
||||||
const dup = await this.tabsService.duplicate(tab)
|
const dup = await this.tabsService.duplicate(tab)
|
||||||
if (dup) {
|
if (dup) {
|
||||||
this.addTabRaw(dup)
|
this.addTabRaw(dup, this.tabs.indexOf(tab) + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user