Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle reset-prompt
- X-seq: zsh-users 15218
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: zle reset-prompt
- Date: Sat, 31 Jul 2010 22:16:10 +0200
- Cc: Simon Friedberger <simon+zsh@xxxxxxxxxx>, zsh-users@xxxxxxx
- In-reply-to: <20100731203055.32fa31f2@pws-pc> (Peter Stephenson's message of "Sat, 31 Jul 2010 20:30:55 +0100")
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20100728201536.GA1146@xxxxxxxxxx> <20100729100452.53f1cc15@xxxxxxx> <20100730135510.GB4728@xxxxxxxxxx> <20100730140827.GC4728@xxxxxxxxxx> <20100731184704.7bbd8a64@pws-pc> <87y6crfqjz.fsf@xxxxxxxxxxxxxxxxxxxxxx> <20100731203055.32fa31f2@pws-pc>
Peter Stephenson wrote:
> On Sat, 31 Jul 2010 20:34:56 +0200
> Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author