init: pristine aerc 0.20.0 source

This commit is contained in:
Mortdecai
2026-04-07 19:54:54 -04:00
commit 083402a548
502 changed files with 68722 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
package commands
import (
"git.sr.ht/~rjarry/aerc/app"
)
type NextPrevTab struct {
Offset int `opt:"n" default:"1"`
}
func init() {
Register(NextPrevTab{})
}
func (NextPrevTab) Description() string {
return "Cycle to the previous or next tab."
}
func (NextPrevTab) Context() CommandContext {
return GLOBAL
}
func (NextPrevTab) Aliases() []string {
return []string{"next-tab", "prev-tab"}
}
func (np NextPrevTab) Execute(args []string) error {
if np.Offset <= 0 {
return nil
}
offset := np.Offset
if args[0] == "prev-tab" {
offset *= -1
}
app.SelectTabAtOffset(offset)
app.UpdateStatus()
return nil
}