From a8eaa99c901af4e4498d45166d5592e7bab91a18 Mon Sep 17 00:00:00 2001 From: Cheney Date: Sun, 27 Sep 2015 00:10:26 +0800 Subject: [PATCH] fix bugs in PrefixCompleter --- complete_helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/complete_helper.go b/complete_helper.go index 82926dd..baf7b90 100644 --- a/complete_helper.go +++ b/complete_helper.go @@ -46,7 +46,7 @@ func (p *PrefixCompleter) Do(line []rune, pos int) (newLine [][]rune, offset int tmpLine := make([]rune, 0, len(line)) for i := offset; i < len(line); i++ { - if line[offset] == ' ' { + if line[i] == ' ' { continue }