summary refs log tree commit diff stats
path: root/lib/ui/tab.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-17 16:19:15 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-17 16:19:15 -0400
commit589db742cb2af4b29607ceba62ceca38ec982f62 (patch)
tree0975f74796cb809cd1bd8d04ee0c7a052a45f3f5 /lib/ui/tab.go
parent9e28a02f6a4345ec7b5fdee68864610186f34e91 (diff)
downloadaerc-589db742cb2af4b29607ceba62ceca38ec982f62.tar.gz
Move exline handling up to aerc, add :term
Diffstat (limited to 'lib/ui/tab.go')
-rw-r--r--lib/ui/tab.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go
index ecd48eb..e41e906 100644
--- a/lib/ui/tab.go
+++ b/lib/ui/tab.go
@@ -30,13 +30,15 @@ func NewTabs() *Tabs {
 	return tabs
 }
 
-func (tabs *Tabs) Add(content Drawable, name string) {
-	tabs.Tabs = append(tabs.Tabs, &Tab{
+func (tabs *Tabs) Add(content Drawable, name string) *Tab {
+	tab := &Tab{
 		Content: content,
 		Name:    name,
-	})
+	}
+	tabs.Tabs = append(tabs.Tabs, tab)
 	tabs.TabStrip.Invalidate()
 	content.OnInvalidate(tabs.invalidateChild)
+	return tab
 }
 
 func (tabs *Tabs) invalidateChild(d Drawable) {