mirror of https://github.com/chzyer/readline.git
Auto complete with space prefixed line (#46)
* auto-complete gets displayed even with space characters prefixing the line * demo test back to chzyer;
This commit is contained in:
parent
f2a9cba613
commit
e3e573aa21
|
@ -73,7 +73,7 @@ func (p *PrefixCompleter) Do(line []rune, pos int) (newLine [][]rune, offset int
|
||||||
}
|
}
|
||||||
|
|
||||||
func Do(p PrefixCompleterInterface, line []rune, pos int) (newLine [][]rune, offset int) {
|
func Do(p PrefixCompleterInterface, line []rune, pos int) (newLine [][]rune, offset int) {
|
||||||
line = line[:pos]
|
line = runes.TrimSpaceLeft(line[:pos])
|
||||||
goNext := false
|
goNext := false
|
||||||
var lineCompleter PrefixCompleterInterface
|
var lineCompleter PrefixCompleterInterface
|
||||||
for _, child := range p.GetChildren() {
|
for _, child := range p.GetChildren() {
|
||||||
|
|
Loading…
Reference in New Issue