fixed cycling tab reordering via hotkeys - fixes #3510

This commit is contained in:
Eugene Pankov 2021-03-13 21:43:36 +01:00
parent e42bd11725
commit 604d7c464f
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4

View file

@ -263,7 +263,7 @@ export class AppService {
if (tabIndex > 0) {
this.swapTabs(this._activeTab, this.tabs[tabIndex - 1])
} else if (this.config.store.appearance.cycleTabs) {
this.swapTabs(this._activeTab, this.tabs[this.tabs.length - 1])
this.tabs.push(this.tabs.shift()!)
}
}
}
@ -277,7 +277,7 @@ export class AppService {
if (tabIndex < this.tabs.length - 1) {
this.swapTabs(this._activeTab, this.tabs[tabIndex + 1])
} else if (this.config.store.appearance.cycleTabs) {
this.swapTabs(this._activeTab, this.tabs[0])
this.tabs.unshift(this.tabs.pop()!)
}
}
}