From 1aac6fc7cec28f6f7c1eb6a5fc23d0fac38f1bf4 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Wed, 16 Oct 2019 19:45:01 -0400 Subject: [PATCH] Bugfix: Empty command crashes the program #9 --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 13dfcc0..a3ead73 100644 --- a/main.go +++ b/main.go @@ -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