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

Re: Bug with the new prompt redraw code



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.



Messages sorted by: Reverse Date, Date, Thread, Author