zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: terminal resizing and prompt problem
Date: Sat, 10 Jul 2004 20:41:40 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.60.0407101848380.24945@toltec.zanshin.com> (raw)
In-Reply-To: <20040710172553.168f14b9@localhost>

On Sat, 10 Jul 2004, Nathan Sommer wrote:

> For each character height I resize vertically, or each character width I 
> resize horizontally, the top line of my prompt is repeated.
[...]
> This is terribly annoying, since it means I can't resize my terminal to 
> see more output, since any additional visibility I would have gained is 
> taken up by the additional lines of my prompt.

Precisely how are you resizing the terminal?

Zsh reprints the prompt each time it gets a SIGWINCH signal.  Normally,
e.g. when dragging the window borders with the mouse, there would be only
a one such signal delivered at the time the mouse was released.

It sounds as though you -- or your window manager -- is performing e.g. 
six resizes of one line each rather than one resize of six lines, causing 
zsh to receive a stream of SIGWINCH signals.  This is not a bug in zsh.

When zsh reprints the prompt, it moves the cursor to the beginning of the 
line (prints a carriage return without a line feed) and then displays the 
prompt.  The line editor only keeps track of where it is on the current 
line, not what may have gone on before it got there, so it doesn't try to 
move up to wherever it was when the prompt began printing.  This could be 
considered a misfeature, but printing the prompt is entirely a separate 
action from editing the command line (the prompt is printed the same way 
whether ZLE is enabled or not).

However, you wouldn't notice (or at least it wouldn't be so annoying) if
your resizing signals weren't behaving so oddly.


  reply	other threads:[~2004-07-11  3:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-10 21:25 Nathan Sommer
2004-07-11  3:41 ` Bart Schaefer [this message]
2004-07-11  4:20   ` Nathan Sommer
2004-07-11  5:56     ` Bart Schaefer
2004-07-11 19:59       ` Nathan Sommer

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.0407101848380.24945@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).