mirror of
https://git.sr.ht/~sircmpwn/aerc
synced 2024-11-23 16:42:07 +01:00
Fix pushing invalid tabs to history
A tab can now only be pushed onto the history if it is a selectable tab.
This commit is contained in:
parent
f1b365dfc3
commit
2542c65af2
@ -107,7 +107,10 @@ func (tabs *Tabs) Select(index int) {
|
||||
}
|
||||
|
||||
if tabs.Selected != index {
|
||||
tabs.pushHistory(tabs.Selected)
|
||||
// only push valid tabs onto the history
|
||||
if tabs.Selected < len(tabs.Tabs) {
|
||||
tabs.pushHistory(tabs.Selected)
|
||||
}
|
||||
tabs.Selected = index
|
||||
tabs.TabStrip.Invalidate()
|
||||
tabs.TabContent.Invalidate()
|
||||
|
Loading…
Reference in New Issue
Block a user