From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id UAA02163 for ; Thu, 7 Sep 1995 20:48:08 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA13754 (5.65c/Gatech-10.0-IDA for ); Thu, 7 Sep 1995 06:47:58 -0400 Received: by math (5.x/SMI-SVR4) id AA19117; Thu, 7 Sep 1995 06:42:07 -0400 Resent-Date: Thu, 7 Sep 1995 11:42:45 +0100 (BST) Old-Return-Path: From: Zefram Message-Id: <17247.199509071042@stone.dcs.warwick.ac.uk> Subject: Re: BUG: listmatches called with bogus list To: hzoli@cs.elte.hu (Zoltan Hidvegi) Date: Thu, 7 Sep 1995 11:42:45 +0100 (BST) Cc: zsh-workers@math.gatech.edu (Z Shell workers mailing list) In-Reply-To: <199509051740.TAA08845@bolyai.cs.elte.hu> from "Zoltan Hidvegi" at Sep 5, 95 07:40:55 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]6252.23 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"qDiwt3.0.Zg4.-niJm"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/368 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----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 ", 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-----