From 7c89143c709e58f22a4939886ccb15bd639eec17 Mon Sep 17 00:00:00 2001 From: Ben Fiedler Date: Thu, 23 Apr 2020 03:56:28 +0200 Subject: Use aerc.PushError where appropriate Forgot an unused import, to save you the hassle here is v2. --- widgets/aerc.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'widgets/aerc.go') diff --git a/widgets/aerc.go b/widgets/aerc.go index 4c8d09df..1d456964 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -408,13 +408,11 @@ func (aerc *Aerc) BeginExCommand(cmd string) { exline := NewExLine(aerc.conf, cmd, func(cmd string) { parts, err := shlex.Split(cmd) if err != nil { - aerc.PushStatus(" "+err.Error(), 10*time.Second). - Color(tcell.ColorDefault, tcell.ColorRed) + aerc.PushError(" "+err.Error()) } err = aerc.cmd(parts) if err != nil { - aerc.PushStatus(" "+err.Error(), 10*time.Second). - Color(tcell.ColorDefault, tcell.ColorRed) + aerc.PushError(" "+err.Error()) } // only add to history if this is an unsimulated command, // ie one not executed from a keybinding @@ -438,8 +436,7 @@ func (aerc *Aerc) RegisterPrompt(prompt string, cmd []string) { } err := aerc.cmd(cmd) if err != nil { - aerc.PushStatus(" "+err.Error(), 10*time.Second). - Color(tcell.ColorDefault, tcell.ColorRed) + aerc.PushError(" "+err.Error()) } }, func(cmd string) []string { return nil // TODO: completions -- cgit