From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10725 invoked from network); 22 Jul 2008 19:49:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Jul 2008 19:49:47 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 70698 invoked from network); 22 Jul 2008 19:49:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Jul 2008 19:49:42 -0000 Received: (qmail 9493 invoked by alias); 22 Jul 2008 19:49:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25326 Received: (qmail 9480 invoked from network); 22 Jul 2008 19:49:38 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 22 Jul 2008 19:49:38 -0000 Received: from mtaout02-winn.ispmail.ntl.com (mtaout02-winn.ispmail.ntl.com [81.103.221.48]) by bifrost.dotsrc.org (Postfix) with ESMTP id D47F980561C5 for ; Tue, 22 Jul 2008 21:49:34 +0200 (CEST) Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20080722195451.RBFI7070.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Tue, 22 Jul 2008 20:54:51 +0100 Received: from pws-pc ([81.107.40.67]) by aamtaout03-winn.ispmail.ntl.com with ESMTP id <20080722200036.DYFP8797.aamtaout03-winn.ispmail.ntl.com@pws-pc> for ; Tue, 22 Jul 2008 21:00:36 +0100 Date: Tue, 22 Jul 2008 20:49:23 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: TTY output mangling when userdirs populated by tab expansion Message-ID: <20080722204923.5533119f@pws-pc> In-Reply-To: <20080722000940.GB41480@redoubt.spodhuis.org> References: <20080722000940.GB41480@redoubt.spodhuis.org> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/7783/Tue Jul 22 21:01:53 2008 on bifrost X-Virus-Status: Clean On Mon, 21 Jul 2008 17:09:41 -0700 Phil Pennock wrote: > Confirmed with a fairly recent CVS-built zsh binary: > > ...% ./dbg/bin/zsh -f > redoubt% PS1='%?[%y]%~%# ' > 0[ttyp4]~% cd /var/home/docs > 0[ttyp4]/var/home/docs% > [type: cd ~] > 0[ttyp4]/var/hocd ~ > [hit ^C] > 1[ttyp4]~docs% > > It looks as though the line-length gets recalculated and the post-prompt > stuff redrawn without the prompt being redrawn, so the text overlays the > prompt and everything is confusing and ugly. The obvious thing to do is not to recalculate the prompt length if you're not going to redisplay it. This is part of the hackery associated with ALWAYS_LAST_PROMPT. This may be OK---I think the case where we do need to redisplay the prompt at this point in the code is where the existing prompt is not kept, i.e. quite specifically not this case. Index: Src/Zle/zle_refresh.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v retrieving revision 1.70 diff -u -r1.70 zle_refresh.c --- Src/Zle/zle_refresh.c 12 May 2008 13:50:43 -0000 1.70 +++ Src/Zle/zle_refresh.c 22 Jul 2008 19:43:28 -0000 @@ -1118,7 +1118,7 @@ /* cheat on attribute unset */ txtunset(TXTBOLDFACE|TXTSTANDOUT|TXTUNDERLINE); - if (trashedzle) + if (trashedzle && !clearflag) reexpandprompt(); resetvideo(); resetneeded = 0; /* unset */ -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/