Merge branch 'fix-footbar' of sloum/bombadillo into develop

Fixes #88
This commit is contained in:
asdf 2019-11-13 20:07:12 -05:00 committed by Gitea
commit bf446289f1
1 changed files with 6 additions and 4 deletions

View File

@ -244,14 +244,13 @@ func (c *client) TakeControlInput() {
err := c.routeCommandInput(p) err := c.routeCommandInput(p)
if err != nil { if err != nil {
c.SetMessage(err.Error(), true) c.SetMessage(err.Error(), true)
c.Draw() c.DrawMessage()
} }
} }
} }
} }
func (c *client) routeCommandInput(com *cmdparse.Command) error { func (c *client) routeCommandInput(com *cmdparse.Command) error {
var err error
switch com.Type { switch com.Type {
case cmdparse.SIMPLE: case cmdparse.SIMPLE:
c.simpleCommand(com.Action) c.simpleCommand(com.Action)
@ -271,7 +270,8 @@ func (c *client) routeCommandInput(com *cmdparse.Command) error {
return fmt.Errorf("Unknown command entry") return fmt.Errorf("Unknown command entry")
} }
return err return nil
} }
func (c *client) simpleCommand(action string) { func (c *client) simpleCommand(action string) {
@ -425,6 +425,7 @@ func (c *client) doCommandAs(action string, values []string) {
c.DrawMessage() c.DrawMessage()
default: default:
c.SetMessage(fmt.Sprintf("Unknown command structure"), true) c.SetMessage(fmt.Sprintf("Unknown command structure"), true)
c.DrawMessage()
} }
} }
@ -474,6 +475,7 @@ func (c *client) doLinkCommandAs(action, target string, values []string) {
c.doCommandAs(action, out) c.doCommandAs(action, out)
default: default:
c.SetMessage(fmt.Sprintf("Unknown command structure"), true) c.SetMessage(fmt.Sprintf("Unknown command structure"), true)
c.DrawMessage()
} }
} }
@ -618,7 +620,7 @@ func (c *client) doLinkCommand(action, target string) {
} }
c.saveFile(u, fn) c.saveFile(u, fn)
default: default:
c.SetMessage(fmt.Sprintf("Action %q does not exist for target %q", action, target), true) c.SetMessage("Unknown command structure", true)
c.DrawMessage() c.DrawMessage()
} }