zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Daniel Hahler <genml+zsh-workers@thequod.de>
Cc: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: Prompt redrawing issues with wrapped prompt on SIGWINCH
Date: Sat, 18 Apr 2015 05:43:13 +0200	[thread overview]
Message-ID: <CAHYJk3Sdrg8FTbu0FJUYCdA_iTFYjAXHhH8f8QJ4fUA1==dCPA@mail.gmail.com> (raw)
In-Reply-To: <55318F9F.7040204@thequod.de>

On Sat, Apr 18, 2015 at 12:56 AM, Daniel Hahler
<genml+zsh-workers@thequod.de> 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


  reply	other threads:[~2015-04-18  3:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 22:56 Daniel Hahler
2015-04-18  3:43 ` Mikael Magnusson [this message]
2015-04-18 15:57   ` Bart Schaefer
2015-04-18 17:04     ` Daniel Hahler
2015-04-18 17:21       ` Bart Schaefer
2015-04-18 21:30         ` Daniel Hahler
2015-04-18 23:00           ` Bart Schaefer

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='CAHYJk3Sdrg8FTbu0FJUYCdA_iTFYjAXHhH8f8QJ4fUA1==dCPA@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=genml+zsh-workers@thequod.de \
    --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).