Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zle reset-prompt



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