From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2541 invoked by alias); 18 Apr 2015 21:30:20 -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: 34932 Received: (qmail 3556 invoked from network); 18 Apr 2015 21:30:15 -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:in-reply-to :references:subject:subject:mime-version:user-agent:from:from :date:date:message-id:received:received; s=postfix2; t= 1429392610; bh=ypRNdpgqPqV49aYhuY3r7yGrttJL933C/vpKtl5t3zQ=; b=S kzNq+MWnJUQPcToK0zSbcdr1BTjTq761AwsXg04L9kqz0HuAkpIz3INiRzEpU8+f 3Bq6BcukGrBBargqKiMI3OKNfXz3KZRGbt2VZc9arz+anGOGyy3B9Greh9OjkEQU 3fWHYISjxNFtjnA4yCftekId1BFrxafRkOmcwRZ2yc= Message-ID: <5532CCE2.1000309@thequod.de> Date: Sat, 18 Apr 2015 23:30:10 +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: Re: Prompt redrawing issues with wrapped prompt on SIGWINCH References: <55318F9F.7040204@thequod.de> <150418085735.ZM12718@torch.brasslantern.com> <55328E8D.8000502@thequod.de> <150418102138.ZM12808@torch.brasslantern.com> In-Reply-To: <150418102138.ZM12808@torch.brasslantern.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 18.04.2015 19:21, Bart Schaefer wrote: > On Apr 18, 7:04pm, Daniel Hahler wrote: > } > } Some remarks: it does not only affect urxvt, but also gnome-terminal. > } So it's likely to be a common issue with all terminals?! > > Doesn't happen to me with xterm, but it sends multiple SIGWINCH rather > than wait for the final size of the window. In xterm I only see a single SIGWINCH (via TRAPWINCH). > } Could this be addressed by e.g. having the terminal notify zsh about > } SIGWINCH before reflowing/rewrapping the text, or something similar? > > Signals are asynchronous at the OS level so the emulator can't control > whether the shell has as chance to respond to the signal before it > redraws the text. In any case this would require reprogramming the > emulator, so is out of our hands. Yes, the emulator would have to be patched/fixed for this. Could it emit/forward the signal, and only redraw after it has been processed by the shell? Or would the shell have to answer / re-emit the signal for this to work? > } > PS1=$'${(pl:COLUMNS-1::=:)}\n %# ' > } > } This suggested workaround only helps if you resize the window by one > } column, e.g. when using the mouse. But modkey-h/l in awesome changes > } the master-window-factor by a percent of the screen size. > > The suggested workaround was successful for me when using mouse-drag to > resize the window, despite urxvt sending only a single SIGWINCH when the > mouse was released, which should be analogous to having the window manager > trigger a proportional resize. What version of zsh do you have? I am using zsh from git master, 5.0.7-dev-1 (@2e48eceb). Thanks, Daniel. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iD8DBQFVMszhfAK/hT/mPgARAhhXAKDNNFviAOKb7FJ4DVmquU0nKMi37QCg0NXP PjFBV8Q7gcgE+mplIyCVLRY= =XoS9 -----END PGP SIGNATURE-----