From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10435 invoked from network); 27 Sep 2005 14:23:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Sep 2005 14:23:04 -0000 Received: (qmail 3482 invoked from network); 27 Sep 2005 14:22:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Sep 2005 14:22:58 -0000 Received: (qmail 1864 invoked by alias); 27 Sep 2005 14:22:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21769 Received: (qmail 1851 invoked from network); 27 Sep 2005 14:22:51 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Sep 2005 14:22:51 -0000 Received: (qmail 3195 invoked from network); 27 Sep 2005 14:22:51 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 27 Sep 2005 14:22:50 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Tue, 27 Sep 2005 15:20:26 +0100 Received: from news01 ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC (5.0.2195.6713); Tue, 27 Sep 2005 15:24:41 +0100 Date: Tue, 27 Sep 2005 15:22:47 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: Regression in UTF-8 support Message-Id: <20050927152247.6a1f6452.pws@csr.com> In-Reply-To: <200509262253.50101.arvidjaar@newmail.ru> References: <200509252005.41824.arvidjaar@newmail.ru> <20050926193703.6cc92722.pws@csr.com> <200509262253.50101.arvidjaar@newmail.ru> 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: 27 Sep 2005 14:24:41.0699 (UTC) FILETIME=[33284330:01C5C36F] 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 Andrey Borzenkov wrote: > this fixed history truncation but not strange mangling in completion > listing. There were some bits I missed or got wrong when updating nicechar(). Index: Src/utils.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/utils.c,v retrieving revision 1.94 diff -u -r1.94 utils.c --- Src/utils.c 20 Sep 2005 16:33:01 -0000 1.94 +++ Src/utils.c 27 Sep 2005 14:19:45 -0000 @@ -260,7 +260,7 @@ * This can't happen if the character is printed "nicely", so * this results in a maximum of two bytes total (plus the null). */ - if (itok(c)) { + if (imeta(c)) { *s++ = Meta; *s++ = c ^ 32; } else Index: Src/Zle/complist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v retrieving revision 1.71 diff -u -r1.71 complist.c --- Src/Zle/complist.c 10 Aug 2005 13:21:16 -0000 1.71 +++ Src/Zle/complist.c 27 Sep 2005 14:19:45 -0000 @@ -570,11 +570,12 @@ cc = *s++ ^ 32; for (t = nicechar(cc); *t; t++) { + int nc = (*t == Meta) ? STOUC(*++t ^ 32) : STOUC(*t); if (ml == mlend - 1 && col == columns - 1) { mlprinted = ml - oml; return 0; } - putc(*t, shout); + putc(nc, shout); if (++col == columns) { ml++; if (mscroll && !--mrestlines && (ask = asklistscroll(ml))) { @@ -978,11 +979,12 @@ c = *s++ ^ 32; for (t = nicechar(c); *t; t++) { + int nc = (*t == Meta) ? STOUC(*++t ^ 32) : STOUC(*t); if (ml == mlend - 1 && col == columns - 1) { mlprinted = ml - oml; return 0; } - putc(*t, shout); + putc(nc, shout); if (++col == columns) { ml++; if (mscroll && !--mrestlines && (ask = asklistscroll(ml))) { -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************