From 28fc9fa53da1449498392f83d63a8502a5a958a3 Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Sun, 26 May 2019 17:37:39 -0400 Subject: Add :save and :pipe commands to viewer * :save takes a path and saves the current message part to that location * :pipe is the same as pipe on the account page, but uses the current message part rather than the whole email (ie :pipe gzip -d) * Refactored account:pipe and extracted common pipe code to commands.util.QuickTerm * Added helper command aerc.PushError --- widgets/aerc.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'widgets/aerc.go') diff --git a/widgets/aerc.go b/widgets/aerc.go index 3c6566d..5b1b151 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -243,6 +243,10 @@ func (aerc *Aerc) PushStatus(text string, expiry time.Duration) *StatusMessage { return aerc.statusline.Push(text, expiry) } +func (aerc *Aerc) PushError(text string) { + aerc.PushStatus(text, 10*time.Second).Color(tcell.ColorDefault, tcell.ColorRed) +} + func (aerc *Aerc) focus(item libui.Interactive) { if aerc.focused == item { return -- cgit v1.2.3