From dee0f8938b62d668ed9105c96313fbd8b8bbd098 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 17 Mar 2019 17:23:53 -0400 Subject: Add :term-close --- widgets/aerc.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'widgets/aerc.go') diff --git a/widgets/aerc.go b/widgets/aerc.go index a968ab1d..49a61bd0 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -139,12 +139,20 @@ func (aerc *Aerc) SelectedAccount() *AccountView { return acct } +func (aerc *Aerc) SelectedTab() ui.Drawable { + return aerc.tabs.Tabs[aerc.tabs.Selected].Content +} + func (aerc *Aerc) NewTab(drawable ui.Drawable, name string) *ui.Tab { tab := aerc.tabs.Add(drawable, name) aerc.tabs.Select(len(aerc.tabs.Tabs) - 1) return tab } +func (aerc *Aerc) RemoveTab(tab ui.Drawable) { + aerc.tabs.Remove(tab) +} + func (aerc *Aerc) NextTab() { next := aerc.tabs.Selected + 1 if next >= len(aerc.tabs.Tabs) { -- cgit