From aabe3d9b3a58efd9f0ad9b39917b85092d0955a1 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 26 Jul 2019 14:37:45 -0400 Subject: Fix invalid tab state when deselecting removed tab --- lib/ui/tab.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ui/tab.go b/lib/ui/tab.go index 6ee5575..b6e7bd5 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -94,7 +94,7 @@ func (tabs *Tabs) Replace(contentSrc Drawable, contentTarget Drawable, name stri func (tabs *Tabs) Select(index int) { if index >= len(tabs.Tabs) { - return + index = len(tabs.Tabs) - 1 } if tabs.Selected != index { -- cgit 1.4.1-2-gfad0