aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msgview/next.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msgview/next.go')
-rw-r--r--commands/msgview/next.go17
1 files changed, 12 insertions, 5 deletions
diff --git a/commands/msgview/next.go b/commands/msgview/next.go
index 0c868397..82fb12f9 100644
--- a/commands/msgview/next.go
+++ b/commands/msgview/next.go
@@ -6,14 +6,21 @@ import (
"git.sr.ht/~sircmpwn/aerc/widgets"
)
+type NextPrevMsg struct{}
+
func init() {
- register("next", NextPrevMessage)
- register("next-message", NextPrevMessage)
- register("prev", NextPrevMessage)
- register("prev-message", NextPrevMessage)
+ register(NextPrevMsg{})
+}
+
+func (_ NextPrevMsg) Aliases() []string {
+ return []string{"next", "next-message", "prev", "prev-message"}
+}
+
+func (_ NextPrevMsg) Complete(aerc *widgets.Aerc, args []string) []string {
+ return nil
}
-func NextPrevMessage(aerc *widgets.Aerc, args []string) error {
+func (_ NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error {
mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
acct := mv.SelectedAccount()
store := mv.Store()