From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21035 invoked from network); 6 Oct 2006 10:04:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) 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.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Oct 2006 10:04:31 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 98638 invoked from network); 6 Oct 2006 10:04:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Oct 2006 10:04:19 -0000 Received: (qmail 25078 invoked by alias); 6 Oct 2006 10:04:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10791 Received: (qmail 25069 invoked from network); 6 Oct 2006 10:04:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 6 Oct 2006 10:04:07 -0000 Received: (qmail 96968 invoked from network); 6 Oct 2006 10:04:07 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 6 Oct 2006 10:04:03 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly11c.srv.mailcontrol.com (MailControl) with ESMTP id k96A3Zkq021196 for ; Fri, 6 Oct 2006 11:04:00 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 6 Oct 2006 11:03:27 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.7/8.13.4) with ESMTP id k96A3R1A019506 for ; Fri, 6 Oct 2006 11:03:27 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.7/8.13.7/Submit) with ESMTP id k96A3RQh019503 for ; Fri, 6 Oct 2006 11:03:27 +0100 Message-Id: <200610061003.k96A3RQh019503@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-users@sunsite.dk (Zsh users list) Subject: Re: _all_matches moves cursor In-reply-to: <200610060941.k969fbIw017806@news01.csr.com> References: <20061006051215.GA12364@mollari.zhar.net> <200610060941.k969fbIw017806@news01.csr.com> Date: Fri, 06 Oct 2006 11:03:27 +0100 From: Peter Stephenson X-OriginalArrivalTime: 06 Oct 2006 10:03:27.0841 (UTC) FILETIME=[AB4DD510:01C6E92E] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-04-02 (www.mailcontrol.com) on 10.67.0.121 Peter Stephenson wrote: > John Eikenberry wrote: > > I recently added _all_matches to my completion config [1] and have come > > across an annoying behaviour. When the '- all matches -' line is longer > > than my terminal is wide, the cursor (along with the command being > > completed) gets bounced down a line. > > Here's a slight cheat that simply shortens the line being added. I've read it more carefully and I think there's simply a bug in the calculation at this point. Try this... Index: Src/Zle/compresult.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v retrieving revision 1.65 diff -u -r1.65 compresult.c --- Src/Zle/compresult.c 11 Aug 2006 21:30:38 -0000 1.65 +++ Src/Zle/compresult.c 6 Oct 2006 10:02:53 -0000 @@ -2126,7 +2126,7 @@ if (add) strcat(buf, " "); strcat(buf, m->str); - len -= t; + len -= t + add; add = 1; } else { if (len > add + 2) { -- 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