From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: Bug with the new prompt redraw code
Date: Sun, 11 Jul 2004 14:09:21 +0100 [thread overview]
Message-ID: <20040711130922.A1C4E865D@pwstephenson.fsnet.co.uk> (raw)
In-Reply-To: "Bart Schaefer"'s message of "Sat, 10 Jul 2004 20:47:38 PDT." <Pine.LNX.4.60.0407102039330.24945@toltec.zanshin.com>
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@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk
next prev parent reply other threads:[~2004-07-11 13:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-11 3:47 Bart Schaefer
2004-07-11 13:09 ` Peter Stephenson [this message]
2004-07-11 16:44 ` Bart Schaefer
2004-07-11 22:42 ` Peter Stephenson
2004-07-12 16:28 ` Bart Schaefer
2004-07-12 17:53 ` Peter Stephenson
2004-07-13 5:08 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040711130922.A1C4E865D@pwstephenson.fsnet.co.uk \
--to=pws@pwstephenson.fsnet.co.uk \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).