about summary refs log tree commit diff stats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-17 17:23:53 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-17 17:23:53 -0400
commitdee0f8938b62d668ed9105c96313fbd8b8bbd098 (patch)
tree2a6d9f1a427d7c4c4dabd371cff5ca0f3fb5ad70 /widgets/aerc.go
parent16c3f0a89309541e36a2de22e91176fd13c67898 (diff)
downloadaerc-dee0f8938b62d668ed9105c96313fbd8b8bbd098.tar.gz
Add :term-close
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index a968ab1..49a61bd 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) {