From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11250 invoked by alias); 31 Jul 2010 20:27:16 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15218 Received: (qmail 3501 invoked from network); 31 Jul 2010 20:27:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: Peter Stephenson Cc: Simon Friedberger , zsh-users@zsh.org Subject: Re: zle reset-prompt In-Reply-To: <20100731203055.32fa31f2@pws-pc> (Peter Stephenson's message of "Sat, 31 Jul 2010 20:30:55 +0100") References: <20100728201536.GA1146@a-oben.org> <20100729100452.53f1cc15@csr.com> <20100730135510.GB4728@a-oben.org> <20100730140827.GC4728@a-oben.org> <20100731184704.7bbd8a64@pws-pc> <87y6crfqjz.fsf@ft.bewatermyfriend.org> <20100731203055.32fa31f2@pws-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Date: Sat, 31 Jul 2010 22:16:10 +0200 Message-ID: <87tynfflv9.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Df-Sender: 430444 Peter Stephenson wrote: > On Sat, 31 Jul 2010 20:34:56 +0200 > Frank Terbeck wrote: >> I thought `reset-prompt' alone was enough, but it's not. Also, this only >> happens, when `clear-screen' and `reset-prompt are used in a single >> widget. If called separately, this doesn't happen either. > > Aha, thanks, that's exactly what I need to know to pin down at least one > problem... It's actually fairly obvious from your description. We > maintain a global status which we save and restore within functions such > as zle widgets that aren't part of the main execution path, but we don't > explicitly restore that global status when redrawing the prompt, so if > we're already in a zle function and the local status has been changed we > use that. So we need to maintain the global status specially for use in > this case. However, we should still maintain the local status within the > function since it needs to obey normal syntax rules, so we have to save > and restore around the prompt redisplay, too. > > This should fix that problem, anyway. There's a pretty good chance this > is Simon's, too. Yes, this fixes it for me. Thanks. Regards, Frank