summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 458c2f9..90b56c8 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -268,6 +268,16 @@ func (aerc *Aerc) SelectTab(name string) bool {
 	return false
 }
 
+func (aerc *Aerc) SelectTabIndex(index int) bool {
+	for i, _ := range aerc.tabs.Tabs {
+		if i == index {
+			aerc.tabs.Select(i)
+			return true
+		}
+	}
+	return false
+}
+
 func (aerc *Aerc) TabNames() []string {
 	var names []string
 	for _, tab := range aerc.tabs.Tabs {