diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-17 17:23:53 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-17 17:23:53 -0400 |
commit | dee0f8938b62d668ed9105c96313fbd8b8bbd098 (patch) | |
tree | 2a6d9f1a427d7c4c4dabd371cff5ca0f3fb5ad70 /lib/ui/tab.go | |
parent | 16c3f0a89309541e36a2de22e91176fd13c67898 (diff) | |
download | aerc-dee0f8938b62d668ed9105c96313fbd8b8bbd098.tar.gz |
Add :term-close
Diffstat (limited to 'lib/ui/tab.go')
-rw-r--r-- | lib/ui/tab.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go index e41e906a..32b195c3 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -62,13 +62,13 @@ func (tabs *Tabs) Remove(content Drawable) { } /* Force the selected index into the existing range */ if tabs.Selected >= len(tabs.Tabs) { - tabs.Select(len(tabs.Tabs) - 1) + tabs.Select(tabs.Selected - 1) } tabs.TabStrip.Invalidate() } func (tabs *Tabs) Select(index int) { - if tabs.Selected >= len(tabs.Tabs) { + if index >= len(tabs.Tabs) { panic("Tried to set tab index to a non-existing element") } |