From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18808 invoked by alias); 1 Oct 2011 19:21:19 -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: 29811 Received: (qmail 12380 invoked from network); 1 Oct 2011 19:21:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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.1 Received-SPF: neutral (ns1.primenet.com.au: 74.125.82.171 is neither permitted nor denied by SPF record at ntlworld.com) X-ProxyUser-IP: 86.6.29.42 Date: Sat, 1 Oct 2011 20:14:50 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: prompts with newlines get printed twice Message-ID: <20111001201450.1ea554a8@pws-pc.ntlworld.com> In-Reply-To: <110925144416.ZM19577@torch.brasslantern.com> References: <110924112412.ZM24918@torch.brasslantern.com> <110925144416.ZM19577@torch.brasslantern.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 25 Sep 2011 14:44:16 -0700 Bart Schaefer wrote: > I've traced this to adjustwinsize() called from zhandler(). It makes > these two calls: > > 1694 zleentry(ZLE_CMD_REFRESH); > 1695 zleentry(ZLE_CMD_RESET_PROMPT); > > The first one calls zrefresh() which erases the current line and then > prints the prompt (lines 1126 - 1129 of zle_refresh.c) and calls > fflush(shout). The second then goes through redisplay(), which moves > up one line to the beginning of the just-printed prompt and sets > resetneeded, but the prompt is never printed nor is shout flushed. > > Can anyone think of a reason not to swap the order of those calls in > adjustwinsize()? It does seem a strange order. You'd have thought that at the least it should ensure the prompt is output. That rather confusing "redisplay" call in zle_resetprompt, which I don't think does actually redisplay anything, isn't helping clarify matters. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/