Correct color of error messages
This commit is contained in:
parent
84965d680c
commit
2958579ee7
|
@ -32,13 +32,13 @@ func Pipe(aerc *widgets.Aerc, args []string) error {
|
||||||
pipe, err := cmd.StdinPipe()
|
pipe, err := cmd.StdinPipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
||||||
Color(tcell.ColorRed, tcell.ColorWhite)
|
Color(tcell.ColorDefault, tcell.ColorRed)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
term, err := widgets.NewTerminal(cmd)
|
term, err := widgets.NewTerminal(cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
||||||
Color(tcell.ColorRed, tcell.ColorWhite)
|
Color(tcell.ColorDefault, tcell.ColorRed)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
host := widgets.NewTermHost(term, aerc.Config())
|
host := widgets.NewTermHost(term, aerc.Config())
|
||||||
|
@ -50,7 +50,7 @@ func Pipe(aerc *widgets.Aerc, args []string) error {
|
||||||
term.OnClose = func(err error) {
|
term.OnClose = func(err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
||||||
Color(tcell.ColorRed, tcell.ColorWhite)
|
Color(tcell.ColorDefault, tcell.ColorRed)
|
||||||
} else {
|
} else {
|
||||||
// TODO: Tab-specific status stacks
|
// TODO: Tab-specific status stacks
|
||||||
aerc.PushStatus("Process complete, press any key to close.",
|
aerc.PushStatus("Process complete, press any key to close.",
|
||||||
|
@ -63,7 +63,7 @@ func Pipe(aerc *widgets.Aerc, args []string) error {
|
||||||
_, err := io.Copy(pipe, reader)
|
_, err := io.Copy(pipe, reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
||||||
Color(tcell.ColorRed, tcell.ColorWhite)
|
Color(tcell.ColorDefault, tcell.ColorRed)
|
||||||
}
|
}
|
||||||
pipe.Close()
|
pipe.Close()
|
||||||
}()
|
}()
|
||||||
|
|
|
@ -39,7 +39,7 @@ func Term(aerc *widgets.Aerc, args []string) error {
|
||||||
aerc.RemoveTab(host)
|
aerc.RemoveTab(host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
||||||
Color(tcell.ColorRed, tcell.ColorWhite)
|
Color(tcell.ColorDefault, tcell.ColorRed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -185,6 +185,6 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) {
|
||||||
case *types.Error:
|
case *types.Error:
|
||||||
acct.logger.Printf("%v", msg.Error)
|
acct.logger.Printf("%v", msg.Error)
|
||||||
acct.host.SetStatus(fmt.Sprintf("%v", msg.Error)).
|
acct.host.SetStatus(fmt.Sprintf("%v", msg.Error)).
|
||||||
Color(tcell.ColorRed, tcell.ColorDefault)
|
Color(tcell.ColorDefault, tcell.ColorRed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,7 +251,7 @@ func (aerc *Aerc) BeginExCommand() {
|
||||||
err := aerc.cmd(cmd)
|
err := aerc.cmd(cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
||||||
Color(tcell.ColorRed, tcell.ColorWhite)
|
Color(tcell.ColorDefault, tcell.ColorRed)
|
||||||
}
|
}
|
||||||
aerc.statusbar.Pop()
|
aerc.statusbar.Pop()
|
||||||
aerc.focus(previous)
|
aerc.focus(previous)
|
||||||
|
|
Loading…
Reference in New Issue