mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-02 03:33:22 +00:00
fix(readline): make esc escape any vim mode
This commit is contained in:
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…
x
Reference in New Issue
Block a user