diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-07-26 14:37:45 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-07-26 14:37:45 -0400 |
commit | aabe3d9b3a58efd9f0ad9b39917b85092d0955a1 (patch) | |
tree | d8d99b07bc206a87dd0bc0f3d0c7b3c9d7a33b07 | |
parent | 6784ed37721d579dd8997e10badfea861ef9e10e (diff) |
Fix invalid tab state when deselecting removed tab
-rw-r--r-- | lib/ui/tab.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |