Implement next-folder using NextPrev with amount
This fixes ~sircmpwn/aerc2#182 https://todo.sr.ht/~sircmpwn/aerc2/182
This commit is contained in:
parent
1f6c108c04
commit
3650b72ca6
3 changed files with 10 additions and 12 deletions
commands/account
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue