diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/Zle/zle_vi.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 6deb834d3..0ad122db1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * 39822: Completion/Unix/Command/_git: remove "-A '-*'" with _arguments for some commands. +2016-11-03 Barton E. Schaefer <schaefer@zsh.org> + + * 39820: Src/Zle/zle_vi.c: vi-repeat handles multi-key bindings + 2016-11-03 Peter Stephenson <p.stephenson@samsung.com> * 39815: Src/lex.c, Test/D04parameter.ztst: read input to end diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c index 1e0402dff..e1cd758f7 100644 --- a/Src/Zle/zle_vi.c +++ b/Src/Zle/zle_vi.c @@ -71,7 +71,7 @@ static int inrepeat, vichgrepeat; * im: >= 0: is an insertmode * -1: skip setting insert mode * -2: entering viins at start of editing from clean --- don't use - * inrepeat or lastchar, synthesise an i to enter insert mode. + * inrepeat or keybuf, synthesise an entry to insert mode. */ /**/ @@ -91,14 +91,16 @@ startvichange(int im) lastmod = zmod; if (vichgbuf) free(vichgbuf); - vichgbuf = (char *)zalloc(vichgbufsz = 16); + vichgbuf = (char *)zalloc(vichgbufsz = 16 + keybuflen); if (im == -2) { vichgbuf[0] = zlell ? (insmode ? (zlecs < zlell ? 'i' : 'a') : 'R') : 'o'; + vichgbuf[1] = '\0'; + vichgbufptr = 1; } else { - vichgbuf[0] = lastchar; + strcpy(vichgbuf, keybuf); + unmetafy(vichgbuf, &vichgbufptr); } - vichgbufptr = 1; vichgrepeat = 0; } } |