From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23023 invoked from network); 24 Apr 2008 10:35:32 -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.5 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; 24 Apr 2008 10:35:32 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 60551 invoked from network); 24 Apr 2008 10:35:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Apr 2008 10:35:25 -0000 Received: (qmail 16306 invoked by alias); 24 Apr 2008 10:35:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24868 Received: (qmail 16288 invoked from network); 24 Apr 2008 10:35:21 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 24 Apr 2008 10:35:21 -0000 Received: from rcpt-expgw.biglobe.ne.jp (rcpt-expgw.biglobe.ne.jp [133.205.19.68]) by bifrost.dotsrc.org (Postfix) with ESMTP id 9815C808A38A for ; Thu, 24 Apr 2008 12:35:12 +0200 (CEST) Received: from smtp-gw.biglobe.ne.jp by rcpt-expgw.biglobe.ne.jp (kbkr/0208160408) with ESMTP id m3OAZAYK028655 for ; Thu, 24 Apr 2008 19:35:10 +0900 X-Biglobe-Sender: Received: from [133.24.86.14] (133.24.86.14 [133.24.86.14]) by smtp-gw.biglobe.ne.jp id TAPFAC15AFD7; Thu, 24 Apr 2008 19:35:10 +0900 (JST) Mime-Version: 1.0 X-Mailer: QUALCOMM MacOS X Eudora Version 6.2J rev3.3 Message-Id: Date: Thu, 24 Apr 2008 19:35:07 +0900 To: zsh-workers@sunsite.dk From: "Jun T." Subject: Re: vi-backward-kill-word Content-Type: text/plain; charset="us-ascii" X-Virus-Scanned: ClamAV 0.91.2/6923/Thu Apr 24 11:44:45 2008 on bifrost X-Virus-Status: Clean Another minor bug in vi mode. If you enter a combined char and delete it in vi-insert mode by ctrl-H (bound to vi-backward-delete-char), then only the base char is deleted. In this case, vibackwarddeletechar() calls backkill() without setting CUT_RAW flag. backkill() correclty finds the new zlecs but does not re-calculate the number of raw chars to be killed (the variable ct). A possible fix may be the following: Index: Src/Zle/zle_utils.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_utils.c,v retrieving revision 1.52 diff -u -r1.52 zle_utils.c --- Src/Zle/zle_utils.c 21 Apr 2008 17:58:59 -0000 1.52 +++ Src/Zle/zle_utils.c 24 Apr 2008 09:48:38 -0000 @@ -589,20 +589,18 @@ mod_export void backkill(int ct, int flags) { - int i; - UNMETACHECK(); if (flags & CUT_RAW) { - i = (zlecs -= ct); + zlecs -= ct; } else { - int n = ct; - while (n--) + int origcs = zlecs; + while (ct--) DECCS(); - i = zlecs; + ct = origcs - zlecs; } - cut(i, ct, flags); - shiftchars(i, ct); + cut(zlecs, ct, flags); + shiftchars(zlecs, ct); CCRIGHT(); } ------ Jun