From 589db742cb2af4b29607ceba62ceca38ec982f62 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 17 Mar 2019 16:19:15 -0400 Subject: Move exline handling up to aerc, add :term --- lib/ui/tab.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') 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) { -- cgit v1.2.3