From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27484 invoked from network); 11 Jul 2004 13:09:40 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 11 Jul 2004 13:09:40 -0000 Received: (qmail 7482 invoked from network); 11 Jul 2004 13:12:12 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Jul 2004 13:12:12 -0000 Received: (qmail 5640 invoked by alias); 11 Jul 2004 13:09:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20147 Received: (qmail 5630 invoked from network); 11 Jul 2004 13:09:25 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 11 Jul 2004 13:09:25 -0000 Received: (qmail 7219 invoked from network); 11 Jul 2004 13:12:03 -0000 Received: from cmailg1.svr.pol.co.uk (195.92.195.171) by a.mx.sunsite.dk with SMTP; 11 Jul 2004 13:11:51 -0000 Received: from modem-92.blue-spotted-wrasse.dialup.pol.co.uk ([62.136.239.92] helo=pwstephenson.fsnet.co.uk) by cmailg1.svr.pol.co.uk with esmtp (Exim 4.14) id 1Bje4s-0001Na-T9 for zsh-workers@sunsite.dk; Sun, 11 Jul 2004 14:09:11 +0100 Received: by pwstephenson.fsnet.co.uk (Postfix, from userid 501) id A1C4E865D; Sun, 11 Jul 2004 09:09:22 -0400 (EDT) Received: from pwstephenson.fsnet.co.uk (localhost [127.0.0.1]) by pwstephenson.fsnet.co.uk (Postfix) with ESMTP id 7165E864D for ; Sun, 11 Jul 2004 14:09:22 +0100 (BST) To: zsh-workers@sunsite.dk Subject: Re: Bug with the new prompt redraw code In-reply-to: "Bart Schaefer"'s message of "Sat, 10 Jul 2004 20:47:38 PDT." Date: Sun, 11 Jul 2004 14:09:21 +0100 From: Peter Stephenson Message-Id: <20040711130922.A1C4E865D@pwstephenson.fsnet.co.uk> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.5 required=6.0 tests=BAYES_50,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.5 Bart Schaefer wrote: > Instead it has the effect of printing a garbage prompt. This appears to > occur because (1) zle-line-init runs before the prompt is displayed, which > seems odd but wouldn't be a big deal except that (2) the prompt printing > code has stashed a pointer to the value of $PS1, which ends up pointing at > reclaimed memory when PS1 is re-assigned. It sounds like a general problem with reassigning prompts in zle. How about passing the address of the prompt variable (the internal one, i.e. prompt, rprompt, etc., not the parameter) to zle instead of the prompt itself? That would have the useful side effect that changes to the variable were reflected when updating. -- Peter Stephenson Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk