Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh crashes on completeion of utf-8 file-names.
- X-seq: zsh-workers 19337
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: zsh crashes on completeion of utf-8 file-names.
- Date: Mon, 5 Jan 2004 09:08:50 -0800
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <11091.1073318874@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <7460.1073312227@xxxxxxx> <11091.1073318874@xxxxxxx>
On Mon, Jan 05, 2004 at 04:07:54PM +0000, Peter Stephenson wrote:
> (By the way, every time I send a message saying I think setting lastval
> = 0 in bin_eval is the correct fix for the eval "" bug, it disappears.
> So let's see if tacking it on here confuses the system sufficiently.)
Looks like you managed to fool it that time! I checked this in.
> + l < len && l < md->len && p[ind] == q[ind]
> + && (p[ind] != Meta || p[ind+1] == q[ind+1]);
> l++, p += add, q += add);
I think it would be more optimal to sanity-check the last value after
the loop finishes, like this (untested):
--- Src/Zle/compmatch.c 8 Aug 2001 07:41:01 -0000 1.37
+++ Src/Zle/compmatch.c 5 Jan 2004 17:03:07 -0000
@@ -1589,7 +1589,9 @@
l++, p += add, q += add);
if (l) {
- /* There was a common prefix, use it. */
+ /* There was a common prefix, use it, but don't end on meta. */
+ if (p[ind-add] == Meta)
+ l--;
md->len -= l; len -= l;
if (sfx) {
md->str -= l; str -= l;
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author