From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16822 invoked by alias); 18 Apr 2015 03:43:29 -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: 34925 Received: (qmail 18736 invoked from network); 18 Apr 2015 03:43:16 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 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== MIME-Version: 1.0 X-Received: by 10.107.132.223 with SMTP id o92mr8030964ioi.49.1429328593515; Fri, 17 Apr 2015 20:43:13 -0700 (PDT) In-Reply-To: <55318F9F.7040204@thequod.de> References: <55318F9F.7040204@thequod.de> Date: Sat, 18 Apr 2015 05:43:13 +0200 Message-ID: Subject: Re: Prompt redrawing issues with wrapped prompt on SIGWINCH From: Mikael Magnusson To: Daniel Hahler Cc: "Zsh Hackers' List" Content-Type: text/plain; charset=UTF-8 On Sat, Apr 18, 2015 at 12:56 AM, Daniel Hahler 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