Fixed: Autocomplete adds unwanted space (ASCII 32)(Issue #190)

This commit is contained in:
denizul 2022-07-04 15:45:26 -04:00
parent 8e4bd417b9
commit e28fe75522
1 changed files with 3 additions and 1 deletions

View File

@ -123,7 +123,9 @@ func (o *opCompleter) HandleCompleteSelect(r rune) bool {
switch r { switch r {
case CharEnter, CharCtrlJ: case CharEnter, CharCtrlJ:
next = false next = false
o.op.buf.WriteRunes(o.op.candidate[o.op.candidateChoise]) target := o.op.candidate[o.op.candidateChoise]
target = target[:len(target)-1]
o.op.buf.WriteRunes()
o.ExitCompleteMode(false) o.ExitCompleteMode(false)
case CharLineStart: case CharLineStart:
num := o.candidateChoise % o.candidateColNum num := o.candidateChoise % o.candidateColNum