mirror of https://github.com/Hilbis/Hilbish
fix(readline): make esc escape any vim mode
parent
5a2e3e4700
commit
0113a4e0b4
|
@ -543,7 +543,7 @@ func (rl *Instance) viEscape(r []rune) {
|
||||||
|
|
||||||
// Sometimes the escape sequence is interleaved with another one,
|
// Sometimes the escape sequence is interleaved with another one,
|
||||||
// but key strokes might be in the wrong order, so we double check
|
// but key strokes might be in the wrong order, so we double check
|
||||||
// and escape the Insert mode only if needed.
|
// and escape the mode only if needed.
|
||||||
if rl.modeViMode == VimInsert && len(r) == 1 && r[0] == 27 {
|
if rl.modeViMode == VimInsert && len(r) == 1 && r[0] == 27 {
|
||||||
if len(rl.line) > 0 && rl.pos > 0 {
|
if len(rl.line) > 0 && rl.pos > 0 {
|
||||||
rl.pos--
|
rl.pos--
|
||||||
|
|
Loading…
Reference in New Issue