From 7e53ce6aea61531cb7e30cfcd62d91d73a20314c Mon Sep 17 00:00:00 2001 From: sloumdrone Date: Mon, 16 Sep 2019 09:53:13 -0700 Subject: [PATCH] Fixed broken simple command: b --- client.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index 3aba883..2800c35 100644 --- a/client.go +++ b/client.go @@ -82,7 +82,8 @@ func (c *client) GetSize() { func (c *client) Draw() { var screen strings.Builder - screen.Grow(c.Height * c.Width) + screen.Grow(c.Height * c.Width + c.Width) + screen.WriteString("\033[0m") screen.WriteString(c.TopBar.Render(c.Width, c.Options["theme"])) screen.WriteString("\n") pageContent := c.PageState.Render(c.Height, c.Width) @@ -121,7 +122,7 @@ func (c *client) Draw() { screen.WriteString(c.RenderMessage()) screen.WriteString("\n") // for the input line screen.WriteString(c.FootBar.Render(c.Width, c.PageState.Position, c.Options["theme"])) - cui.Clear("screen") + // cui.Clear("screen") cui.MoveCursorTo(0,0) fmt.Print(screen.String()) } @@ -216,7 +217,7 @@ func (c *client) TakeControlInput() { err := c.routeCommandInput(p) if err != nil { c.SetMessage(err.Error(), true) - c.DrawMessage() + c.Draw() } } } @@ -261,6 +262,7 @@ func (c *client) simpleCommand(action string) { } case "B", "BOOKMARKS": c.BookMarks.ToggleOpen() + c.Draw() case "SEARCH": c.search() case "HELP", "?":