Corrected lexer commands

This commit is contained in:
sloumdrone 2019-10-12 11:48:16 -07:00
parent 3af224056a
commit 3537880242
2 changed files with 10 additions and 3 deletions

View File

@ -289,8 +289,15 @@ func (c *client) simpleCommand(action string) {
case "B", "BOOKMARKS": case "B", "BOOKMARKS":
c.BookMarks.ToggleOpen() c.BookMarks.ToggleOpen()
c.Draw() c.Draw()
case "R", "REFRESH": case "R", "RELOAD":
// TODO build refresh code c.ClearMessage()
err := c.ReloadPage()
if err != nil {
c.SetMessage(err.Error(), false)
c.DrawMessage()
} else {
c.Draw()
}
case "SEARCH": case "SEARCH":
c.search("", "", "?") c.search("", "", "?")
case "HELP", "?": case "HELP", "?":

View File

@ -69,7 +69,7 @@ func (s *scanner) scanText() Token {
capInput := strings.ToUpper(buf.String()) capInput := strings.ToUpper(buf.String())
switch capInput { switch capInput {
case "D", "DELETE", "A", "ADD","W", "WRITE", case "D", "DELETE", "A", "ADD","W", "WRITE",
"S", "SET", "R", "REFRESH", "SEARCH", "S", "SET", "R", "RELOAD", "SEARCH",
"Q", "QUIT", "B", "BOOKMARKS", "H", "Q", "QUIT", "B", "BOOKMARKS", "H",
"HOME", "?", "HELP", "C", "CHECK", "HOME", "?", "HELP", "C", "CHECK",
"P", "PURGE": "P", "PURGE":