aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/account/next-folder.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/commands/account/next-folder.go b/commands/account/next-folder.go
index 414e606..537a351 100644
--- a/commands/account/next-folder.go
+++ b/commands/account/next-folder.go
@@ -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
}