From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15940 invoked from network); 21 Oct 2005 09:04:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Oct 2005 09:04:34 -0000 Received: (qmail 90936 invoked from network); 21 Oct 2005 09:04:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Oct 2005 09:04:23 -0000 Received: (qmail 17659 invoked by alias); 21 Oct 2005 09:04:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21897 Received: (qmail 17571 invoked from network); 21 Oct 2005 09:04:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Oct 2005 09:04:19 -0000 Received: (qmail 90195 invoked from network); 21 Oct 2005 09:04:18 -0000 Received: from cluster-d.mailcontrol.com (HELO rly18d.srv.mailcontrol.com) (217.69.20.190) by a.mx.sunsite.dk with SMTP; 21 Oct 2005 09:04:17 -0000 Received: from exchange03.csr.com (mailhost1.csr.com [81.105.217.43]) by rly18d.srv.mailcontrol.com (MailControl) with ESMTP id j9L93t2k018501 for ; Fri, 21 Oct 2005 10:04:14 +0100 Received: from news01 ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 21 Oct 2005 10:06:08 +0100 Date: Fri, 21 Oct 2005 10:03:52 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: PATCH: displaying wide characters Message-Id: <20051021100352.4467ba69.pws@csr.com> In-Reply-To: <1051020150255.ZM6346@candle.brasslantern.com> References: <200510192031.j9JKVYk7010115@pwslaptop.csr.com> <200510192041.j9JKfTJZ010450@pwslaptop.csr.com> <237967ef0510191739t103352a9vad735334a790d8b5@mail.gmail.com> <1051020150255.ZM6346@candle.brasslantern.com> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 21 Oct 2005 09:06:08.0095 (UTC) FILETIME=[AC79BEF0:01C5D61E] X-Scanned-By: MailControl A-05-40-01 (www.mailcontrol.com) on 10.68.0.128 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Bart Schaefer wrote: > Looks like an off-by-one error somewhere. > > *** /tmp/zsh.ztst.out.4543 Thu Oct 20 08:00:11 2005 > --- /tmp/zsh.ztst.tout.4543 Thu Oct 20 08:00:11 2005 > *************** > *** 1,2 **** > ! start ...d at 10 Not truncated ... > ! start truncat... Not truncated ... > --- 1,2 ---- > ! start ...d at 10 Not truncated .. > ! start truncat... Not truncated .. > Test ../../zsh-4.0/Test/D01prompt.ztst failed: output differs from expected as > shown above for: > print -P 'start %10<... print -P 'start %10>...>truncated at 10%>> Not truncated%3> ...>Not shown' > Was testing: prompt truncation It looks like it, but it isn't. I didn't change the old code here, and this feature is in 4.2. I was going by the manual: %string> %[xstring] ... If the string is longer than the specified truncation length, it will appear in full, completely replacing the truncated string. which is unambiguous, so I presume there is a bug in the old code. Even more confusingly, it does the following (in both 4.2 and the non-multibyte code): % print -P '%10<01234567890123456789abcde>truncated at 10' 0123456789 % print -P '%10<0123456789abcdef Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com