main: Skip command autocomplete if space-prefixed

Fixes #300
This commit is contained in:
Andrey Petrov 2019-03-15 18:39:53 -04:00
parent ae46a91e0f
commit 3f0faf761e

View File

@ -231,7 +231,7 @@ func (h *Host) AutoCompleteFunction(u *message.User) func(line string, pos int,
posPartial := pos - len(partial)
var completed string
if isFirst && strings.HasPrefix(partial, "/") {
if isFirst && strings.HasPrefix(line, "/") {
// Command
completed = h.completeCommand(partial)
if completed == "/reply" {