diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ui/tab.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go index 9c19cd7b..ef9fcd83 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -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() |