zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: prompts with newlines get printed twice
Date: Sat, 1 Oct 2011 20:14:50 +0100	[thread overview]
Message-ID: <20111001201450.1ea554a8@pws-pc.ntlworld.com> (raw)
In-Reply-To: <110925144416.ZM19577@torch.brasslantern.com>

On Sun, 25 Sep 2011 14:44:16 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> I've traced this to adjustwinsize() called from zhandler().  It makes
> these two calls:
> 
> 1694            zleentry(ZLE_CMD_REFRESH);
> 1695            zleentry(ZLE_CMD_RESET_PROMPT);
> 
> The first one calls zrefresh() which erases the current line and then
> prints the prompt (lines 1126 - 1129 of zle_refresh.c) and calls
> fflush(shout).  The second then goes through redisplay(), which moves
> up one line to the beginning of the just-printed prompt and sets
> resetneeded, but the prompt is never printed nor is shout flushed.
> 
> Can anyone think of a reason not to swap the order of those calls in
> adjustwinsize()?

It does seem a strange order.  You'd have thought that at the least it
should ensure the prompt is output.  That rather confusing "redisplay"
call in zle_resetprompt, which I don't think does actually redisplay
anything, isn't helping clarify matters.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


      reply	other threads:[~2011-10-01 19:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAF3NQe_arDSLBRUEKRfZyDx-2QhsfP63xFYktxKK45a1iA6Eow@mail.gmail.com>
     [not found] ` <110924112412.ZM24918@torch.brasslantern.com>
     [not found]   ` <CAHYJk3QcrD6gVcGRrVX=n2bL5ZW9F93f39-BYq1a1iyQeZyB1g@mail.gmail.com>
2011-09-25 21:44     ` Bart Schaefer
2011-10-01 19:14       ` Peter Stephenson [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=20111001201450.1ea554a8@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /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).