From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26972 invoked from network); 23 Apr 2008 08:33:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Apr 2008 08:33:36 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 97951 invoked from network); 23 Apr 2008 08:33:29 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Apr 2008 08:33:29 -0000 Received: (qmail 12526 invoked by alias); 23 Apr 2008 08:33:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24865 Received: (qmail 12507 invoked from network); 23 Apr 2008 08:33:24 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 23 Apr 2008 08:33:24 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTP id 918C4808A37A for ; Wed, 23 Apr 2008 10:33:21 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly22d.srv.mailcontrol.com (MailControl) with ESMTP id m3N8Vk2G022755 for ; Wed, 23 Apr 2008 09:33:19 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Wed, 23 Apr 2008 09:32:55 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id m3N8WtHn018742 for ; Wed, 23 Apr 2008 09:32:55 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id m3N8WtT2018739 for ; Wed, 23 Apr 2008 09:32:55 +0100 Message-Id: <200804230832.m3N8WtT2018739@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: vi-backward-kill-word In-reply-to: References: <20080421182728.3450104d@news01> Comments: In-reply-to "Jun T." message dated "Wed, 23 Apr 2008 02:56:02 +0900." Date: Wed, 23 Apr 2008 09:32:55 +0100 From: Peter Stephenson X-OriginalArrivalTime: 23 Apr 2008 08:32:55.0975 (UTC) FILETIME=[A10D9B70:01C8A51C] X-Scanned-By: MailControl A-08-00-04 (www.mailcontrol.com) on 10.68.0.132 X-Virus-Scanned: ClamAV 0.91.2/6901/Wed Apr 23 07:15:52 2008 on bifrost X-Virus-Status: Clean "Jun T." wrote: > In vireplacechars(), line 545 (zle_vi.c), > foredel(n - newchars, CUT_RAW); > > this will remove the base character "e" at zlecs, shift the > combining character, and move zlecs to the next base char "o". Yes, that needs to use shiftchars(), as I've already done in overwrite mode. Index: Src/Zle/zle_vi.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_vi.c,v retrieving revision 1.20 diff -u -r1.20 zle_vi.c --- Src/Zle/zle_vi.c 21 Apr 2008 17:30:36 -0000 1.20 +++ Src/Zle/zle_vi.c 23 Apr 2008 08:31:48 -0000 @@ -540,9 +540,11 @@ * Make sure we delete displayed characters, including * attach combining characters. n includes this as a raw * buffer offset. + * Use shiftchars so as not to adjust the cursor position; + * we are overwriting anything that remains directly. */ if (n > newchars) - foredel(n - newchars, CUT_RAW); + shiftchars(zlecs, n - newchars); else if (n < newchars) spaceinline(newchars - n); while (newchars--) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070