diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-10-23 21:27:06 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-11-09 21:14:24 +0100 |
commit | 0f78cb2ea97ca501b6eb0d659f883197753ee075 (patch) | |
tree | 54f3d2d3a2837b414c59b534d2992a1450dddbff /commands/msg/pipe.go | |
parent | 9921b33679f6b0c9d2a609fe3112178ec40b8dd2 (diff) | |
download | aerc-0f78cb2ea97ca501b6eb0d659f883197753ee075.tar.gz |
lib: implement an eml message view
Implement a MessageView representation for eml data that are not stored
in a message store. With this, we can display any rfc822 message data in
the message viewer.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg/pipe.go')
-rw-r--r-- | commands/msg/pipe.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go index d0101675..4a5a6168 100644 --- a/commands/msg/pipe.go +++ b/commands/msg/pipe.go @@ -123,6 +123,18 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { h := newHelper(aerc) store, err := h.store() if err != nil { + if mv, ok := provider.(*widgets.MessageViewer); ok { + mv.MessageView().FetchFull(func(reader io.Reader) { + if background { + doExec(reader) + } else { + doTerm(reader, + fmt.Sprintf("%s <%s", + cmd[0], title)) + } + }) + return nil + } return err } uids, err = h.markedOrSelectedUids() @@ -215,7 +227,9 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { } }) } - provider.Store().Marker().ClearVisualMark() + if store := provider.Store(); store != nil { + store.Marker().ClearVisualMark() + } return nil } |