show latest error in the config file at init

This commit is contained in:
Gokcehan 2016-10-16 21:27:40 +03:00
parent 5e2028e943
commit d36e272272

View File

@ -44,12 +44,13 @@ func client() {
p := newParser(rcFile)
for p.parse() {
if p.err != nil {
app.ui.message = "see the log file for errors in the configuration file"
log.Print(p.err)
}
p.expr.eval(app, nil)
}
if p.err != nil {
app.ui.message = p.err.Error()
log.Print(p.err)
}
}
app.ui.draw(app.nav)