diff --git a/bin/ksh/vi.c b/bin/ksh/vi.c index 42e03b0e3f6..1e3c36834d3 100644 --- a/bin/ksh/vi.c +++ b/bin/ksh/vi.c @@ -297,6 +297,7 @@ vi_hook(int ch) state = nextstate(ch); if (state == VSEARCH) { save_cbuf(); + srchlen = 0; es->cursor = 0; es->linelen = 0; if (ch == '/') {