zsh-workers
 help / color / mirror / code / Atom feed
* Prompt redrawing issues with wrapped prompt on SIGWINCH
@ 2015-04-17 22:56 Daniel Hahler
  2015-04-18  3:43 ` Mikael Magnusson
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Hahler @ 2015-04-17 22:56 UTC (permalink / raw)
  To: Zsh Hackers' List

-----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.

1. Start:
⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[🐍 ?]
❯❯

2. Make it smaller:
⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[🐍 ?]
❯❯ 

3. Larger again (original size):
⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[🐍 ?]
❯❯

4. Smaller again:
⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[~]⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[🐍 ?]
❯❯


My terminal is rxvt-unicode, but this also happens with gnome-terminal.

I am using the awesome window manager, using a tiled layout and use mod-j/k to resize the window.

Using TRAPWINCH shows a single WINCH signal per resize.

In case this isn't reproducible for you I'd like to get some pointers how to debug this.
It's probably related to zsh's SIGWINCH handling?


Thanks,
Daniel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iD8DBQFVMY+ffAK/hT/mPgARAvAuAJ4sEL1XxztaAqQd4Xn+NYdzky+7eACbBAyh
6rKH3Tlc1ZkQ2CZ/TsOAx2s=
=Jjm4
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-18 23:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17 22:56 Prompt redrawing issues with wrapped prompt on SIGWINCH Daniel Hahler
2015-04-18  3:43 ` Mikael Magnusson
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

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).