From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6081 invoked from network); 11 Jul 2004 16:45:05 -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 16:45:05 -0000 Received: (qmail 23586 invoked from network); 11 Jul 2004 16:47:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Jul 2004 16:47:42 -0000 Received: (qmail 29366 invoked by alias); 11 Jul 2004 16:44:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20148 Received: (qmail 29356 invoked from network); 11 Jul 2004 16:44:49 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 11 Jul 2004 16:44:49 -0000 Received: (qmail 23319 invoked from network); 11 Jul 2004 16:47:34 -0000 Received: from unknown (HELO moonbase.zanshin.com) (@167.160.213.139) by a.mx.sunsite.dk with SMTP; 11 Jul 2004 16:47:21 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i6BGiYnJ003832 for ; Sun, 11 Jul 2004 09:44:35 -0700 Date: Sun, 11 Jul 2004 09:44:34 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: zsh-workers@sunsite.dk Subject: Re: Bug with the new prompt redraw code In-Reply-To: <20040711130922.A1C4E865D@pwstephenson.fsnet.co.uk> Message-ID: References: <20040711130922.A1C4E865D@pwstephenson.fsnet.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Sun, 11 Jul 2004, Peter Stephenson wrote: > > (1) zle-line-init runs before the prompt is displayed > > (2) the prompt printing code has stashed a pointer to the value of > > $PS1, which ends up pointing at reclaimed memory > > 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 might do it, but it'd be a moderately extensive change, and it has to be done carefully, because some other callers of zleread() pass NULL for the rprompt and so on. Also it doesn't address (1) but then maybe that doesn't matter.