Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in ZSH's vi emulation
- X-seq: zsh-workers 39814
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug in ZSH's vi emulation
- Date: Wed, 2 Nov 2016 21:44:18 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=rGtxcHyJ5bpvYoitYkxNAgyYr4sFSCk5zIYc4e0oCFQ=; b=qTFdtqjQhruVpCDlGw4GTifAC9KHf8e29HK8nOL6/1/GKjUbQ/HCoteDU3dEIE5PBA egFQ8WBy+/kcGXrAHN5/fawl2zrFp/8KRbDJ6eHc/AE9w8/2dXTalqNPV64QZ1CqcGIS pd4x05QOxprhrPpcjenZYMR3AK2x19ymJR02w2qyTEzz7m/GjLg+RkiyBwn4XL3nJ1z7 yENSRgKwzfpaHzHnMU1Pu9/H5tNQn0g5juJECJyVRwioZzjgHqbAezlZKpDym90o3dYx ED0/RccDiDPfu9IgHNnOIzWAJgyD3+veVvyjPxDgdBr+K/jlycY476r98KIvoqxEWIz0 HcQw==
- In-reply-to: <11719.1478105483@hydra.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20161005080921.GB26647@raspi> <161005101938.ZM12590@torch.brasslantern.com> <20161102045925.GA6763@fujitsu.shahaf.local2> <11719.1478105483@hydra.kiddle.eu>
On Nov 2, 5:51pm, Oliver Kiddle wrote:
}
} We've also got a separate issue of only lastchar being stuffed into
} vichgbuf so repeating, e.g. gU doesn't work.
So, given 39813, this seems to work:
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c
index 1e0402d..bd692af 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -91,14 +91,15 @@ 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';
+ vichgbufptr = 1;
} else {
- vichgbuf[0] = lastchar;
+ strcpy(vichgbuf, keybuf);
+ unmetafy(vichgbuf, &vichgbufptr);
}
- vichgbufptr = 1;
vichgrepeat = 0;
}
}
All X02zlevi tests pass, and I'm even able to do e.g. gUfx to uppercase
everything through the next "x".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author