diff options
author | Pranjal Kole <pranjal.kole7@gmail.com> | 2021-11-19 14:41:02 +0530 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-11-19 10:16:50 +0100 |
commit | ac8b5b8d7ee45bcaac6b91b809a7a41224a742bd (patch) | |
tree | 72be72624e4b7c8d528a2f0e50eb0f60dbb1c463 /commands.go | |
parent | Handle tcell error events by closing (diff) |
Fix crash when lone slash is entered
See ticket #79 for more information
Diffstat (limited to 'commands.go')
-rw-r--r-- | commands.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands.go b/commands.go index 701fe4b..f81974f 100644 --- a/commands.go +++ b/commands.go @@ -554,7 +554,7 @@ func parseCommand(s string) (command, args string, isCommand bool) { if s[0] != '/' { return "", s, false } - if s[1] == '/' { + if len(s) > 1 && s[1] == '/' { // Input starts with two slashes. return "", s[1:], false } |