Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug with the new prompt redraw code
- X-seq: zsh-workers 20147
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug with the new prompt redraw code
- Date: Sun, 11 Jul 2004 14:09:21 +0100
- In-reply-to: "Bart Schaefer"'s message of "Sat, 10 Jul 2004 20:47:38 PDT." <Pine.LNX.4.60.0407102039330.24945@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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 <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author