Get rid of the aerc.PushError(" " + $string) idiom
The individual callers should not be responsible for padding
This commit is contained in:
parent
949781fa0a
commit
8ea86cea41
18 changed files with 29 additions and 29 deletions
commands/msgview
|
@ -44,14 +44,14 @@ func (Open) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
|
||||
tmpFile, err := ioutil.TempFile(os.TempDir(), "aerc-*"+extension)
|
||||
if err != nil {
|
||||
aerc.PushError(" " + err.Error())
|
||||
aerc.PushError(err.Error())
|
||||
return
|
||||
}
|
||||
defer tmpFile.Close()
|
||||
|
||||
_, err = io.Copy(tmpFile, reader)
|
||||
if err != nil {
|
||||
aerc.PushError(" " + err.Error())
|
||||
aerc.PushError(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ func (Open) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
go func() {
|
||||
err := xdg.Wait()
|
||||
if err != nil {
|
||||
aerc.PushError(" " + err.Error())
|
||||
aerc.PushError(err.Error())
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue