diff options
author | Oliver Kiddle <opk@zsh.org> | 2016-11-20 23:54:45 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2016-11-20 23:59:48 +0100 |
commit | cb5f100bd38a3b21739897fb4236db0700b39477 (patch) | |
tree | 8ad0e44d32b2bf7e7c11e05f9789b7efef2e9a3f /Src/Zle/zle_misc.c | |
parent | fe67ccacf15ee92864f7485fd9e54c3dd1f5d1e3 (diff) | |
download | zsh-cb5f100bd38a3b21739897fb4236db0700b39477.tar.gz zsh-cb5f100bd38a3b21739897fb4236db0700b39477.tar.xz zsh-cb5f100bd38a3b21739897fb4236db0700b39477.zip |
39986, 39989: improve handling of vi-repeat-change
Save previous vi change and throw away a new change that fails. Add zle -f vichange to allow shell widget to be a single change. Fix repeat of command where numeric arguments were multiplied.
Diffstat (limited to 'Src/Zle/zle_misc.c')
-rw-r--r-- | Src/Zle/zle_misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index fbd40cd03..898b552de 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -609,8 +609,10 @@ viputbefore(UNUSED(char **args)) int n = zmult; startvichange(-1); - if (n < 0 || zmod.flags & MOD_NULL) + if (n < 0) return 1; + if (zmod.flags & MOD_NULL) + return 0; if (zmod.flags & MOD_VIBUF) kctbuf = &vibuf[zmod.vibuf]; else @@ -630,8 +632,10 @@ viputafter(UNUSED(char **args)) int n = zmult; startvichange(-1); - if (n < 0 || zmod.flags & MOD_NULL) + if (n < 0) return 1; + if (zmod.flags & MOD_NULL) + return 0; if (zmod.flags & MOD_VIBUF) kctbuf = &vibuf[zmod.vibuf]; else |