Zsh Mailing List Archive
Messages sorted by:
Re: terminal resizing and prompt problem
- X-seq: zsh-users 7674
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: terminal resizing and prompt problem
- Date: Sat, 10 Jul 2004 20:41:40 -0700 (PDT)
- In-reply-to: <20040710172553.168f14b9@localhost>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040710172553.168f14b9@localhost>
- Reply-to: zsh-users@xxxxxxxxxx
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.
Messages sorted by: