about summary refs log tree commit diff stats
path: root/lib/ui
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-07-26 14:37:45 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-26 14:37:45 -0400
commitaabe3d9b3a58efd9f0ad9b39917b85092d0955a1 (patch)
treed8d99b07bc206a87dd0bc0f3d0c7b3c9d7a33b07 /lib/ui
parent6784ed37721d579dd8997e10badfea861ef9e10e (diff)
downloadaerc-aabe3d9b3a58efd9f0ad9b39917b85092d0955a1.tar.gz
Fix invalid tab state when deselecting removed tab
Diffstat (limited to 'lib/ui')
-rw-r--r--lib/ui/tab.go2
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 {