summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorAditya Srivastava <adityasri@ocf.berkeley.edu>2019-08-11 20:42:49 -0700
committerDrew DeVault <sir@cmpwn.com>2019-08-13 10:49:34 +0900
commitf0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0 (patch)
tree51749e0d818357854791dbfdd8428d6c29035873 /widgets
parent72204d1f24d4082acc750b73dcda6981edd21a38 (diff)
downloadaerc-f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0.tar.gz
add close command at global level
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 5a7914a..2c783d4 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -244,6 +244,14 @@ func (aerc *Aerc) SelectedTab() ui.Drawable {
 	return aerc.tabs.Tabs[aerc.tabs.Selected].Content
 }
 
+func (aerc *Aerc) SelectedTabName() string {
+	return aerc.tabs.Tabs[aerc.tabs.Selected].Name
+}
+
+func (aerc *Aerc) SelectedTabIndex() int {
+	return aerc.tabs.Selected
+}
+
 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)