diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-10-23 21:27:08 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-11-09 21:14:31 +0100 |
commit | 3e52278e86d07192a21a2624ccbabdc1d3ea5ad6 (patch) | |
tree | 88e23c7f9299f85ad607c942ccc7ec7cb97560f2 /widgets/msgviewer.go | |
parent | 492f89d7cde937011ebb8bce245eedd0e44e9839 (diff) | |
download | aerc-3e52278e86d07192a21a2624ccbabdc1d3ea5ad6.tar.gz |
viewer: open rfc822 attachments
Open message/rfc822 attachments from the message viewer when no filter
is defined for this mimetype. When the rfc822 part is selected, call the
eml command to open the attachment in a new message viewer.
Suggested-by: Jens Grassel <jens@wegtam.com>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r-- | widgets/msgviewer.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index 837c0608..19be7473 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -727,7 +727,14 @@ func newNoFilterConfigured(pv *PartViewer) *ui.Grid { var actions []string - for _, command := range noFilterConfiguredCommands { + configured := noFilterConfiguredCommands + if strings.Contains(strings.ToLower(pv.part.MIMEType), "message") { + configured = append(configured, []string{ + ":eml<Enter>", "View message attachment", + }) + } + + for _, command := range configured { cmd := command[0] name := command[1] strokes, _ := config.ParseKeyStrokes(cmd) |