summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_vi.c
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@fairlystable.org>2025-04-30 02:07:56 -0700
committerJoe Rayhawk <jrayhawk@fairlystable.org>2025-04-30 02:07:56 -0700
commit26e09889646be3ea65b4a3dfeda26213e4bb6a27 (patch)
tree4f3c73a9416bf47ad7e125383d23cf42879e38d7 /Src/Zle/zle_vi.c
parent841bce705a58b04220b1f257abcc00ae71cbdbdc (diff)
parent001cba48ce3b964cf01fb3e2af54b20eacbc9bf5 (diff)
downloadzsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.tar.gz
zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Src/Zle/zle_vi.c')
-rw-r--r--Src/Zle/zle_vi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c
index 0f198d0e8..6692df830 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -1014,6 +1014,9 @@ int
visetbuffer(char **args)
{
ZLE_INT_T ch;
+ const ZLE_CHAR_T *match = ZWS("_*+");
+ int registermod[] = { MOD_NULL, MOD_PRI, MOD_CLIP };
+ ZLE_CHAR_T *found;
if (*args) {
ch = **args;
@@ -1022,12 +1025,12 @@ visetbuffer(char **args)
} else {
ch = getfullchar(0);
}
- if (ch == ZWC('_')) {
- zmod.flags |= MOD_NULL;
+ if ((found = ZS_strchr(match, ch))) {
+ zmod.flags |= registermod[found - match];
prefixflag = 1;
return 0;
} else
- zmod.flags &= ~MOD_NULL;
+ zmod.flags &= ~(MOD_NULL | MOD_OSSEL);
if ((ch < ZWC('0') || ch > ZWC('9')) &&
(ch < ZWC('a') || ch > ZWC('z')) &&
(ch < ZWC('A') || ch > ZWC('Z')))