From: Wayne Davison <wayned@users.sourceforge.net>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: zsh crashes on completeion of utf-8 file-names.
Date: Mon, 5 Jan 2004 09:08:50 -0800 [thread overview]
Message-ID: <20040105170850.GB4482@blorf.net> (raw)
In-Reply-To: <11091.1073318874@csr.com>
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..
next prev parent reply other threads:[~2004-01-05 17:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-21 14:44 Zvi Har'El
2004-01-05 14:17 ` Peter Stephenson
2004-01-05 16:07 ` Peter Stephenson
2004-01-05 17:08 ` Wayne Davison [this message]
2004-02-06 16:57 ` Wayne Davison
2004-02-06 19:03 ` Bart Schaefer
2004-02-09 22:34 ` Wayne Davison
2004-02-09 22:36 ` Wayne Davison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040105170850.GB4482@blorf.net \
--to=wayned@users.sourceforge.net \
--cc=pws@csr.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).