Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: listmatches called with bogus list
- X-seq: zsh-workers 368
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: hzoli@xxxxxxxxxx (Zoltan Hidvegi)
- Subject: Re: BUG: listmatches called with bogus list
- Date: Thu, 7 Sep 1995 11:42:45 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx (Z Shell workers mailing list)
- In-reply-to: <199509051740.TAA08845@xxxxxxxxxxxxxxxxx> from "Zoltan Hidvegi" at Sep 5, 95 07:40:55 pm
-----BEGIN PGP SIGNED MESSAGE-----
Zoltan wrote:
>Here is the bug:
>
>% zsh -f
>bolyai% setopt autolist
>bolyai% bindkey '^[[19~' where-is
>bolyai%
>Where is: kill-_
>BUG: listmatches called with bogus list
>
>As I remember, it is somewhere in Zefram's code which causes this bug (i.e. it
>is not present in beta10).
Yup. I put in a sanity check, because of the previous bug or two that
it would catch (and because of the possibility of there being more such
bugs, of course).
In this case, the sanity check got it wrong. The list is absolutely
fine. It's just that validlist wasn't set. You can observe this: type
"ls <tab>", so that a list is formed, then do a where-is, and it will
happily list the editor function names. Here's the patch:
*** Src/zle_tricky.c.1.20 1995/08/09 05:33:48
--- Src/zle_tricky.c 1995/09/07 10:30:55
***************
*** 3704,3715 ****
{
int hw = haswhat, ip = ispattern;
char *lp = lpre, *ls = lsuf;
! int nm = nmatches;
char **am = amatches;
char *ex = expl;
haswhat = HAS_MISC;
ispattern = 0;
lpre = lsuf = "";
expl = NULL;
--- 3704,3716 ----
{
int hw = haswhat, ip = ispattern;
char *lp = lpre, *ls = lsuf;
! int nm = nmatches, vl = validlist;
char **am = amatches;
char *ex = expl;
haswhat = HAS_MISC;
ispattern = 0;
+ validlist = 1;
lpre = lsuf = "";
expl = NULL;
***************
*** 3720,3725 ****
--- 3721,3727 ----
expl = ex;
amatches = am;
nmatches = nm;
+ validlist = vl;
lpre = lp;
lsuf = ls;
ispattern = ip;
-zefram
-----BEGIN PGP SIGNATURE-----
Version: 2.6.i
iQBVAgUBME7MZmWJ8JfKi+e9AQG8DQH/VJyf9tfMEAHNfdthxCNEBaHjfIhkAjE/
6fNvRO2CtGi6DtjbWUrS2yy3hVvuovi8yB6EL1R10Q9/O+LULRpiIA==
=I40w
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author