Implement :next-tab, :prev-tab
This commit is contained in:
parent
589db742cb
commit
14cb8cb51f
3 changed files with 64 additions and 6 deletions
widgets
|
|
@ -146,6 +146,22 @@ func (aerc *Aerc) NewTab(drawable ui.Drawable, name string) *ui.Tab {
|
|||
return tab
|
||||
}
|
||||
|
||||
func (aerc *Aerc) NextTab() {
|
||||
next := aerc.tabs.Selected + 1
|
||||
if next >= len(aerc.tabs.Tabs) {
|
||||
next = 0
|
||||
}
|
||||
aerc.tabs.Select(next)
|
||||
}
|
||||
|
||||
func (aerc *Aerc) PrevTab() {
|
||||
next := aerc.tabs.Selected - 1
|
||||
if next < 0 {
|
||||
next = len(aerc.tabs.Tabs) - 1
|
||||
}
|
||||
aerc.tabs.Select(next)
|
||||
}
|
||||
|
||||
// TODO: Use per-account status lines, but a global ex line
|
||||
func (aerc *Aerc) SetStatus(status string) *StatusMessage {
|
||||
return aerc.statusline.Set(status)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue