about summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2020-03-02 19:54:42 +0000
committerReto Brunner <reto@labrat.space>2020-03-03 20:08:29 +0100
commit68f179021d304d6edf939ecf5fc7d0d073b16152 (patch)
tree0ba86642579bfc7fa87ce38473ce234208277336 /widgets
parent2e381fa42d64442262335101fe3b7bf76ab50b92 (diff)
downloadaerc-68f179021d304d6edf939ecf5fc7d0d073b16152.tar.gz
Add move-tab command
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index a0e356a..a9be47e 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -283,6 +283,14 @@ func (aerc *Aerc) SelectedTab() ui.Drawable {
 	return aerc.tabs.Tabs[aerc.tabs.Selected].Content
 }
 
+func (aerc *Aerc) SelectedTabIndex() int {
+	return aerc.tabs.Selected
+}
+
+func (aerc *Aerc) NumTabs() int {
+	return len(aerc.tabs.Tabs)
+}
+
 func (aerc *Aerc) NewTab(clickable ui.Drawable, name string) *ui.Tab {
 	tab := aerc.tabs.Add(clickable, name)
 	aerc.tabs.Select(len(aerc.tabs.Tabs) - 1)
@@ -297,6 +305,10 @@ func (aerc *Aerc) ReplaceTab(tabSrc ui.Drawable, tabTarget ui.Drawable, name str
 	aerc.tabs.Replace(tabSrc, tabTarget, name)
 }
 
+func (aerc *Aerc) MoveTab(i int) {
+	aerc.tabs.MoveTab(i)
+}
+
 func (aerc *Aerc) NextTab() {
 	aerc.tabs.NextTab()
 }