zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Bug with the new prompt redraw code
Date: Mon, 12 Jul 2004 22:08:27 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.60.0407122156280.19233@toltec.zanshin.com> (raw)
In-Reply-To: <200407121753.i6CHrQtD008332@news01.csr.com>

On Mon, 12 Jul 2004, Peter Stephenson wrote:

> Bart Schaefer wrote:
> > So, what about (1)?  To repeat, the intent was to display a multi-line 
> > prompt immediately after a command finishes, but then refresh only the 
> > last line of that prompt on subsequent zle redisplays (the original 
> > example involved SIGWINCH handling).
> 
> It sounds like zrefresh() should be moved earlier, out of zlecore().
> 
> This means zle-line-init is basically the last thing executed before the
> editor starts looking for input.  Hence zle-line-init will only affect
> the next prompt, but the previous prompt will have been drawn.

This does sound like the approach that I asked for, and the C code seems 
to do the intended things, but it doesn't quite achieve the visible effect 
that I wanted.

The PS1 prompt as set at precmd time does indeed display, regardless of 
any change made in zle-line-init.

However, upon receiving SIGWINCH, the old prompt is still redrawn.  The 
new prompt doesn't kick in until "zle reset-prompt" is run ... but if one 
runs reset-prompt from zle-line-init, it immediately erases the old prompt 
and redraws, so we're almost back where we started.  The specific case of 
redrawing only the last line of a multi-line prompt *does* work, but only 
when the one-line PS1 assigned in zle-line-init is indistinguishable from 
the last line of the multi-line PS1 assigned in precmd, if you see what I 
mean.

I tried using a TRAPWINCH but that doesn't get executed until _after_ zle 
has had it's shot at the signal, so one always gets at least one spurious 
redraw of the old PS1 before anything can be done about it.

At this point it's probably not worth messing with further, though there 
does not seem to be any harm in committing 20153.


      reply	other threads:[~2004-07-13  5:08 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
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 [this message]

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=Pine.LNX.4.60.0407122156280.19233@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --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).