From 3f0faf761e0c3acc0ab0e06b8b0008b76e582b1b Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Fri, 15 Mar 2019 18:39:53 -0400 Subject: [PATCH] main: Skip command autocomplete if space-prefixed Fixes #300 --- host.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host.go b/host.go index 0ee043f..068b969 100644 --- a/host.go +++ b/host.go @@ -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" {