Implement next-folder using NextPrev with amount

This fixes ~sircmpwn/aerc2#182

https://todo.sr.ht/~sircmpwn/aerc2/182
This commit is contained in:
Jelle Besseling 2019-08-04 16:05:06 +02:00 committed by Drew DeVault
parent 1f6c108c04
commit 3650b72ca6
3 changed files with 10 additions and 12 deletions
commands/account

View file

@ -40,12 +40,10 @@ func (_ NextPrevFolder) Execute(aerc *widgets.Aerc, args []string) error {
if acct == nil {
return errors.New("No account selected")
}
for ; n > 0; n-- {
if args[0] == "prev-folder" {
acct.Directories().Prev()
} else {
acct.Directories().Next()
}
if args[0] == "prev-folder" {
acct.Directories().NextPrev(-n)
} else {
acct.Directories().NextPrev(n)
}
return nil
}