From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7627 invoked from network); 5 Jan 2008 13:11:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) 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.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Jan 2008 13:11:18 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 90225 invoked from network); 5 Jan 2008 13:11:13 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jan 2008 13:11:13 -0000 Received: (qmail 16400 invoked by alias); 5 Jan 2008 13:11:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24362 Received: (qmail 16377 invoked from network); 5 Jan 2008 13:11:09 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 5 Jan 2008 13:11:09 -0000 Received: from virusfilter.dotsrc.org (bifrost [127.0.0.1]) by spamfilter.dotsrc.org (Postfix) with ESMTP id BB3078058FF2 for ; Sat, 5 Jan 2008 14:11:02 +0100 (CET) Received: from mtaout03-winn.ispmail.ntl.com (mtaout03-winn.ispmail.ntl.com [81.103.221.49]) by bifrost.dotsrc.org (Postfix) with ESMTP for ; Sat, 5 Jan 2008 14:11:02 +0100 (CET) Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20080105131219.LUPA20647.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Sat, 5 Jan 2008 13:12:19 +0000 Received: from pws-pc ([82.6.96.116]) by aamtaout01-winn.ispmail.ntl.com with SMTP id <20080105131222.QABV219.aamtaout01-winn.ispmail.ntl.com@pws-pc> for ; Sat, 5 Jan 2008 13:12:22 +0000 Date: Sat, 5 Jan 2008 13:10:19 +0000 From: Peter Stephenson To: zsh-workers Subject: Re: UTF-8/unicode/widechar refresh bug Message-Id: <20080105131019.48638031.p.w.stephenson@ntlworld.com> In-Reply-To: <237967ef0712212103r45a56d3ci14074ceb6ae172f2@mail.gmail.com> References: <237967ef0712212103r45a56d3ci14074ceb6ae172f2@mail.gmail.com> X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.3; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP On Sat, 22 Dec 2007 06:03:57 +0100 "Mikael Magnusson" wrote: > bindkey '^E' reset-prompt #or whatever key you want > : aaaaa(enter some characters so the cursor just wraps)〜aaaaaaaa > > at this point everything after the character that probably gets > garbled in the mail disappears. This seems to fix the problem. Index: Src/Zle/zle_refresh.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v retrieving revision 1.50 diff -u -r1.50 zle_refresh.c --- Src/Zle/zle_refresh.c 23 Nov 2007 00:19:23 -0000 1.50 +++ Src/Zle/zle_refresh.c 5 Jan 2008 13:09:51 -0000 @@ -1055,6 +1055,18 @@ ccs = lpromptw; } +#ifdef MULTIBYTE_SUPPORT + /* + * Realign to a real character after any jiggery pokery at + * the start of the line. + */ + while (*nl == WEOF) { + nl++, ccs++, vcs++; + if (*ol) + ol++; + } +#endif + /* 3: main display loop - write out the buffer using whatever tricks we can */ for (;;) { -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/