From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21156 invoked by alias); 17 Apr 2015 23:04:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34923 Received: (qmail 29733 invoked from network); 17 Apr 2015 23:03:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= content-transfer-encoding:content-type:content-type:subject :subject:mime-version:user-agent:from:from:date:date:message-id :received:received; s=postfix2; t=1429311391; bh=QPrsr8a7fsvfPKo L+gwKT9Yrej1rCoHiRzQVzIymILE=; b=Y7561c+6oe1p6SipFmolSyVu/b7E4Nn l3cb34u3V1UyJKEUW9RUNMBZJJ+bRLlDVqoqopsAOOs1Hllwx1OVC/viiQryNh6H EqK30ai7H2ang6YwuWe0Nra3B0pSQbErKlBOS9LdIuhxtX7aEaKDvdDdjA5Nx3RM +DhfdbQQ6A+4= Message-ID: <55318F9F.7040204@thequod.de> Date: Sat, 18 Apr 2015 00:56:31 +0200 From: Daniel Hahler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Zsh Hackers' List Subject: Prompt redrawing issues with wrapped prompt on SIGWINCH Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit -----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-----