aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 14cf3c44..079d4429 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -252,6 +252,28 @@ func (aerc *Aerc) PrevTab() {
aerc.tabs.Select(next)
}
+func (aerc *Aerc) SelectTab(name string) bool {
+ for i, tab := range aerc.tabs.Tabs {
+ if tab.Name == name {
+ aerc.tabs.Select(i)
+ return true
+ }
+ }
+ return false
+}
+
+func (aerc *Aerc) TabNames() []string {
+ var names []string
+ for _, tab := range aerc.tabs.Tabs {
+ names = append(names, tab.Name)
+ }
+ return names
+}
+
+func (aerc *Aerc) SelectPreviousTab() bool {
+ return aerc.tabs.SelectPrevious()
+}
+
// TODO: Use per-account status lines, but a global ex line
func (aerc *Aerc) SetStatus(status string) *StatusMessage {
return aerc.statusline.Set(status)