From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25213 invoked from network); 21 Jan 1999 16:11:33 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 21 Jan 1999 16:11:33 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id LAA01074; Thu, 21 Jan 1999 11:08:55 -0500 (EST) Resent-Date: Thu, 21 Jan 1999 11:08:55 -0500 (EST) Date: Thu, 21 Jan 1999 17:07:44 +0100 (MET) Message-Id: <199901211607.RAA22270@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu Subject: Re: experimental new style completion Resent-Message-ID: <"qs00_2.0.gG.N4rfs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4944 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Another small fix to the new style completion stuff. This time it's a memory problem: with -k you can give the code an array. When building the things to put into the command line it uses the strings in it before copying them. The only easy solution I currently see is to move the call to dupstring() up, although that will sometimes create copies that aren't needed. Hm. Bye Sven *** Src/Zle/zle_tricky.c.old Thu Jan 21 17:02:28 1999 --- Src/Zle/zle_tricky.c Thu Jan 21 17:03:05 1999 *************** *** 2552,2557 **** --- 2552,2559 ---- hn = (HashNode) t; pm = (Param) t; + if (incompfunc) + s = dupstring(s); if (!addwhat) { test = 1; } else if (addwhat == -1 || addwhat == -5 || addwhat == -6 || *************** *** 2687,2694 **** } if (!test) return; - if (incompfunc) - s = dupstring(s); if (!ms && !ispattern && ai->firstm) { if ((test = sl - pfxlen(ai->firstm->str, s)) < ai->prerest) ai->prerest = test; --- 2689,2694 ---- -- Sven Wischnowsky wischnow@informatik.hu-berlin.de