From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8905 invoked from network); 30 Oct 2006 12:56:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Oct 2006 12:56:06 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 17822 invoked from network); 30 Oct 2006 12:55:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Oct 2006 12:55:59 -0000 Received: (qmail 23863 invoked by alias); 30 Oct 2006 12:55:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22921 Received: (qmail 23853 invoked from network); 30 Oct 2006 12:55:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 30 Oct 2006 12:55:56 -0000 Received: (qmail 17555 invoked from network); 30 Oct 2006 12:55:56 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 30 Oct 2006 12:55:55 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly16d.srv.mailcontrol.com (MailControl) with ESMTP id k9UCtp7W020786 for ; Mon, 30 Oct 2006 12:55:51 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 30 Oct 2006 12:55:51 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.7/8.13.4) with ESMTP id k9RBtaHO007939 for ; Fri, 27 Oct 2006 12:55:37 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.7/8.13.7/Submit) with ESMTP id k9RBtZPd007936 for ; Fri, 27 Oct 2006 12:55:36 +0100 Message-Id: <200610271155.k9RBtZPd007936@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: obscure crash Date: Fri, 27 Oct 2006 12:55:35 +0100 From: Peter Stephenson X-OriginalArrivalTime: 30 Oct 2006 12:55:51.0175 (UTC) FILETIME=[BA535970:01C6FC22] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-06-65 (www.mailcontrol.com) on 10.68.0.126 hasbrpsfx() in compresult.c can be called from the display code when the current completion line is in the wide character form, but it expects the other form. This was quite hard to trigger; I had to do accept-and-menu-complete three times on a non-trivial completion (actually after "p4 revert", so it's difficult even to set up). It didn't seem to happen with normal file completion. Index: Src/Zle/compresult.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v retrieving revision 1.68 diff -u -r1.68 compresult.c --- Src/Zle/compresult.c 7 Oct 2006 08:05:03 -0000 1.68 +++ Src/Zle/compresult.c 30 Oct 2006 12:52:45 -0000 @@ -683,11 +683,19 @@ mod_export int hasbrpsfx(Cmatch m, char *pre, char *suf) { - METACHECK(); + int was_meta; + + /* May not be metafied if calculating whether to show a list. */ + if (zlemetaline == NULL) { + was_meta = 0; + metafy_line(); + } else + was_meta = 1; if (m->flags & CMF_ALL) return 1; - else { + + { char *op = lastprebr, *os = lastpostbr; VARARR(char, oline, zlemetall); int oll = zlemetall, ocs = zlemetacs, ole = lastend, opcs = brpcs, oscs = brscs, ret; @@ -717,6 +725,8 @@ lastprebr = op; lastpostbr = os; + if (!was_meta) + unmetafy_line(); return ret; } } -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php