mirror of https://github.com/Hilbis/Hilbish
fix(readline): access oldComp not from readline instance
parent
1e868e4165
commit
1b298fd0d7
|
@ -21,7 +21,7 @@ func (rl *Instance) insertCandidateVirtual(candidate []rune) {
|
||||||
// Keep reference of previous candidate to compare its prefix
|
// Keep reference of previous candidate to compare its prefix
|
||||||
oldComp := rl.currentComp
|
oldComp := rl.currentComp
|
||||||
// We place the cursor back at the beginning of the previous virtual candidate
|
// We place the cursor back at the beginning of the previous virtual candidate
|
||||||
rl.pos -= len(rl.oldComp)
|
rl.pos -= len(oldComp)
|
||||||
|
|
||||||
// We delete the previous virtual completion, just
|
// We delete the previous virtual completion, just
|
||||||
// like we would delete a word in vim editing mode.
|
// like we would delete a word in vim editing mode.
|
||||||
|
|
Loading…
Reference in New Issue