From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20634 invoked by alias); 28 Dec 2011 00:53:33 -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: 30070 Received: (qmail 3543 invoked from network); 28 Dec 2011 00:53:22 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) MIME-Version: 1.0 In-Reply-To: <877h1hn40t.wl%hskuhra@fastmail.fm> References: <1324929718.26691.140661016136941@webmail.messagingengine.com> <111226183140.ZM23495@torch.brasslantern.com> <877h1hn40t.wl%hskuhra@fastmail.fm> Date: Tue, 27 Dec 2011 16:53:15 -0800 Message-ID: Subject: Re: zsh-4.3.1[45] problem on FreeBSD From: Bart Schaefer To: Zsh hackers list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Dec 27, 2011 at 12:38 PM, Herbert J. Skuhra w= rote: > On Mon, 26 Dec 2011 18:31:40 -0800 > Bart Schaefer wrote: > >> Hrm. =A0This must have something to do with TIOCGWINSZ not being defined >> on that platform and something causing re-entry into adjustwinsize(), >> but I don't have a FreeBSD system to test on and I can't tell whether >> it's a recursive call or simply that we've created an infinite series >> of SIGWINCH somehow. > > % ./configure > [...] > checking for conflicts in sys/time.h and sys/select.h... no > checking TIOCGWINSZ in termios.h... yes Hrm again. Nothing interesting happens in zle_resetprompt() as far as I can tell: zle_resetprompt(void) { reexpandprompt(); if (zleactive) redisplay(NULL); } And: redisplay(UNUSED(char **args)) { moveto(0, 0); zputc(&zr_cr); /* extra care */ tc_upcurs(lprompth - 1); resetneeded =3D 1; clearflag =3D 0; return 0; } So unless the curses library is doing something wacko, I can't find any reason why it would be a problem to reset the prompt before / independently of calling zrefresh(). However, adjustwinsize() it is literally the only place zle_resetprompt() is called; usually resetting the prompt is done via a widget if at all. Out of curiosity, what happens if you put a "sleep 5" somewhere in your init files? I'm wondering if there's some kind of race between the terminal getting opened and the first attempt to output something.