Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Prompt redrawing issues with wrapped prompt on SIGWINCH
- X-seq: zsh-workers 34925
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- Subject: Re: Prompt redrawing issues with wrapped prompt on SIGWINCH
- Date: Sat, 18 Apr 2015 05:43:13 +0200
- Cc: "Zsh Hackers' List" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XCXAbaeRo4Od6wwWPUAJCEBS6FLMYvWy9d1/QcQYkgQ=; b=s+q7VA+qjocNYt2Gd2WAUuuLpH/5c4d8w2ZpE9/GJqBQW9YlNw4OnoV/UhWJr8BiVG GXwhcXULEwXOXaM2yna3jjoxNIAq/tBF8jT7w3XMNIA0mSOIfDS19O5EMlgIIsqMJmCI Nbr4j1ABMy37FeFyWcL0jdgKw56OjAgi1KH0GYCMBlyHrE2qUU4DjR0WWqFceAe6R7t9 DtQz/dVIgsjxBdEUULnBgDeYg470XQzd6dAGbZbrgFEoYTHWOtTvJJMhxgmZ3zK6fuK2 TZu1w/mF2DFmrQGF9owIqhqBwr2g8DfpEP5/BZ8XRJ16DbrNmYIXpuiZ0jPkbaIOkv81 /LXg==
- In-reply-to: <55318F9F.7040204@thequod.de>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <55318F9F.7040204@thequod.de>
On Sat, Apr 18, 2015 at 12:56 AM, Daniel Hahler
<genml+zsh-workers@xxxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am seeing weird redrawing issues when resizing the terminal window with the prompt at the bottom, and the prompt needs to be rewrapped.
>
> TEST CASE:
>
> 1. zsh -f
> 2. setopt promptsubst
> 3. PS1="\${(pl:\$((\$COLUMNS))::=:)} %# "
>
> Now fill the terminal window, e.g. with "ls", so that the prompt gets displayed at the bottom.
>
> When resizing the terminal window now, Zsh does not redraw itself properly: the prompt will moves upwards, overwriting output from "ls".
>
> This also happens with a static PS1, when the window gets too narrow:
>
> PS1="===================================== %# "
>
>
> There is no clear pattern in what goes wrong. With my prompt it will also duplicate the first part of it, and it seems to make a difference if the first line is "full" before the linebreak.
Urxvt reflows long lines on resize and obviously this happens before
zsh gets a chance to redraw the prompt. I don't know if there's any
possible way zle can know how the cursor moved because of this, and
especially difficult is to know how much the display scrolled.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author