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":
c.BookMarks.ToggleOpen()
c.Draw()
case "R", "REFRESH":
// TODO build refresh code
case "R", "RELOAD":
c.ClearMessage()
err := c.ReloadPage()
if err != nil {
c.SetMessage(err.Error(), false)
c.DrawMessage()
} else {
c.Draw()
}
case "SEARCH":
c.search("", "", "?")
case "HELP", "?":

View File

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