diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-17 16:19:15 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-17 16:19:15 -0400 |
commit | 589db742cb2af4b29607ceba62ceca38ec982f62 (patch) | |
tree | 0975f74796cb809cd1bd8d04ee0c7a052a45f3f5 /lib/ui | |
parent | 9e28a02f6a4345ec7b5fdee68864610186f34e91 (diff) | |
download | aerc-589db742cb2af4b29607ceba62ceca38ec982f62.tar.gz |
Move exline handling up to aerc, add :term
Diffstat (limited to 'lib/ui')
-rw-r--r-- | lib/ui/tab.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go index ecd48ebb..e41e906a 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) { |