From c55223106dc68a330bef4fde55260fb4502eeb4e Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 9 Jun 2019 18:29:21 -0400 Subject: Fix :move command's arg parsing --- commands/msg/move.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'commands') diff --git a/commands/msg/move.go b/commands/msg/move.go index 7742ffb..5300c5a 100644 --- a/commands/msg/move.go +++ b/commands/msg/move.go @@ -17,11 +17,11 @@ func init() { } func Move(aerc *widgets.Aerc, args []string) error { - opts, optind, err := getopt.Getopts(args[1:], "p") + opts, optind, err := getopt.Getopts(args, "p") if err != nil { return err } - if optind != len(args)-2 { + if optind != len(args)-1 { return errors.New("Usage: mv [-p] ") } var ( @@ -46,7 +46,7 @@ func Move(aerc *widgets.Aerc, args []string) error { aerc.RemoveTab(widget) } acct.Messages().Next() - store.Move([]uint32{msg.Uid}, args[optind+1], createParents, func( + store.Move([]uint32{msg.Uid}, args[optind], createParents, func( msg types.WorkerMessage) { switch msg := msg.(type) { -- cgit 1.4.1-2-gfad0