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.h | |
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.h')
-rw-r--r-- | Src/Zle/zle.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Src/Zle/zle.h b/Src/Zle/zle.h index e9b14281d..8f92e5611 100644 --- a/Src/Zle/zle.h +++ b/Src/Zle/zle.h @@ -284,6 +284,20 @@ struct change { #define CH_NEXT (1<<0) /* next structure is also part of this change */ #define CH_PREV (1<<1) /* previous structure is also part of this change */ +/* vi change handling for vi-repeat-change */ + +/* + * Examination of the code suggests vichgbuf is consistently tied + * to raw byte input, so it is left as a character array rather + * than turned into wide characters. In particular, when we replay + * it we use ungetbytes(). + */ +struct vichange { + struct modifier mod; /* value of zmod associated with vi change */ + char *buf; /* bytes for keys that make up the vi command */ + int bufsz, bufptr; /* allocated and in use sizes of buf */ +}; + /* known thingies */ #define Th(X) (&thingies[X]) |