From 5df1ebce35bd8e5f98ca44d7ce8f2ffc0fe99d33 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 6 Nov 2022 01:22:52 +0100 Subject: [PATCH] Merged patch from https://lists.sr.ht/~rjarry/aerc-devel/patches/34390 Reference: https://lists.sr.ht/~rjarry/aerc-devel/patches/34390 --- commands/compose/markup.go | 36 ++++++++++++++++++++++++++++++ config/config.go | 17 ++++++++++++++ doc/aerc-config.5.scd | 16 ++++++++++++++ doc/aerc.1.scd | 6 +++++ widgets/compose.go | 45 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 commands/compose/markup.go diff --git a/commands/compose/markup.go b/commands/compose/markup.go new file mode 100644 index 0000000..2f646c1 --- /dev/null +++ b/commands/compose/markup.go @@ -0,0 +1,36 @@ +package compose + +import ( + "fmt" + "git.sr.ht/~rjarry/aerc/widgets" +) + +type MarkUp struct{} + +func init() { + register(MarkUp{}) +} + +func (MarkUp) Aliases() []string { + return []string{"markup"} +} + +func (MarkUp) Complete(aerc *widgets.Aerc, args []string) []string { + composer, _ := aerc.SelectedTabContent().(*widgets.Composer) + return composer.GetMarkups() +} + +func (MarkUp) Execute(aerc *widgets.Aerc, args []string) error { + if len(args) != 2 { + return fmt.Errorf("Usage: :markup