1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-22 05:17:27 +00:00

Bugfix: Empty command crashes the program #9

This commit is contained in:
2019-10-16 19:45:01 -04:00
parent 8e6724bdb6
commit 1aac6fc7ce

View File

@ -632,6 +632,9 @@ func handleInput(viewName string) error {
}
if strings.HasPrefix(inputString, cmdPrefix) {
cmd := delete_empty(strings.Split(inputString[len(cmdPrefix):], " "))
if len(cmd) < 1 {
return nil
}
if c, ok := commands[cmd[0]]; ok {
c.Exec(cmd)
return nil