zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: hzoli@cs.elte.hu (Zoltan Hidvegi)
Cc: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: Re: BUG: listmatches called with bogus list
Date: Thu, 7 Sep 1995 11:42:45 +0100 (BST)	[thread overview]
Message-ID: <17247.199509071042@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <199509051740.TAA08845@bolyai.cs.elte.hu> 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-----


  reply	other threads:[~1995-09-07 10:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-09-05 16:22 Zoltan Hidvegi
1995-09-05 17:40 ` Zoltan Hidvegi
1995-09-07 10:42   ` Zefram [this message]
2000-01-06  7:56 Tanaka Akira
2000-01-06  9:27 Sven Wischnowsky

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=17247.199509071042@stone.dcs.warwick.ac.uk \
    --to=a.main@dcs.warwick.ac.uk \
    --cc=hzoli@cs.elte.hu \
    --cc=zsh-workers@math.gatech.edu \
    /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).