From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22489 invoked from network); 2 Nov 2006 16:22:54 -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; 2 Nov 2006 16:22:54 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 55735 invoked from network); 2 Nov 2006 16:22:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Nov 2006 16:22:44 -0000 Received: (qmail 17815 invoked by alias); 2 Nov 2006 16:22:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22950 Received: (qmail 17802 invoked from network); 2 Nov 2006 16:22:39 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Nov 2006 16:22:39 -0000 Received: (qmail 55346 invoked from network); 2 Nov 2006 16:22:39 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 2 Nov 2006 16:22:31 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly06c.srv.mailcontrol.com (MailControl) with ESMTP id kA2GMG0j016878 for ; Thu, 2 Nov 2006 16:22:25 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Thu, 2 Nov 2006 16:22:20 +0000 Date: Thu, 2 Nov 2006 16:22:19 +0000 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: visible mark and reverse-menu-complete Message-Id: <20061102162219.f75d40f8.pws@csr.com> In-Reply-To: References: Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.8.20; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 02 Nov 2006 16:22:20.0471 (UTC) FILETIME=[12292470:01C6FE9B] X-Scanned-By: MailControl A-07-06-75 (www.mailcontrol.com) on 10.67.0.116 J=F6rg Sommer wrote: > Hi, >=20 > I've two problems/questions: >=20 > =B7 Is it possible to make the mark (the text between the point where you > pressed ^@ and the editing point) visible? I thought of something like > printing the text in inverse mode (\e[7m). This is tricky. Putting display information between editing characters is something it would be very nice to do for several reasons, but it would involve a lot of work on the interface to the screen refresh code. The problem is that what is output isn't a stream of bytes, it's more like a grid of characters corresponding to what's on the screen, so we need a way of supplying characters that won't be printed. You could imagine a hack where you identified typical termcap sequences like the above and output them separately without updating the display but that's horribly non portable and I don't like it at all; what's more it's, internally at least, half way to a proper solution. > =B7 To iterate through a list of menu completions I use > reverse-menu-completion. But if no menu completion startet r-m-c starts > at the begin of the list not the end. This looks very much like a bug. Luckily, there's a simple quick fix, and I have very little interest in looking for a difficult slow fix... Index: Src/Zle/zle_tricky.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v retrieving revision 1.78 diff -u -r1.78 zle_tricky.c --- Src/Zle/zle_tricky.c 25 Oct 2006 18:01:42 -0000 1.78 +++ Src/Zle/zle_tricky.c 2 Nov 2006 16:16:47 -0000 @@ -345,8 +345,14 @@ reversemenucomplete(char **args) { wouldinstab =3D 0; - if (!menucmp) - return menucomplete(args); + if (!menucmp) { + menucomplete(args); + /* + * Drop through, since we are now on the first item instead of + * the last. We've already updated the display, so this is a + * bit inefficient, but it's simple and it works. + */ + } =20 runhookdef(REVERSEMENUHOOK, NULL); return 0; --=20 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