From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 657 invoked from network); 28 Mar 2008 23:17:05 -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.6 required=5.0 tests=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; 28 Mar 2008 23:17:05 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 23412 invoked from network); 28 Mar 2008 23:17:01 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Mar 2008 23:17:01 -0000 Received: (qmail 27256 invoked by alias); 28 Mar 2008 23:16:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24777 Received: (qmail 27236 invoked from network); 28 Mar 2008 23:16:56 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 28 Mar 2008 23:16:56 -0000 Received: from mtaout03-winn.ispmail.ntl.com (mtaout03-winn.ispmail.ntl.com [81.103.221.49]) by bifrost.dotsrc.org (Postfix) with ESMTP id F0BD982CD274 for ; Sat, 29 Mar 2008 00:16:52 +0100 (CET) Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20080328232016.MZQG1244.mtaout03-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Fri, 28 Mar 2008 23:20:16 +0000 Received: from pws-pc ([81.107.40.67]) by aamtaout02-winn.ispmail.ntl.com with ESMTP id <20080328231842.DPFV17393.aamtaout02-winn.ispmail.ntl.com@pws-pc> for ; Fri, 28 Mar 2008 23:18:42 +0000 Date: Fri, 28 Mar 2008 23:16:00 +0000 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: ZLE redraw bug Message-ID: <20080328231600.29033f92@pws-pc> In-Reply-To: <17393e3e0803270047s66f47a34k4cdd8d3186e01151@mail.gmail.com> References: <17393e3e0803270047s66f47a34k4cdd8d3186e01151@mail.gmail.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.5; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/6451/Fri Mar 28 22:24:23 2008 on bifrost X-Virus-Status: Clean On Thu, 27 Mar 2008 03:47:50 -0400 "Matt Wozniski" wrote: > OK, this has been bugging me for a while, and was still an issue with > 4.3.5 dev 4, so I finally sat down to try to get a manageable test > case for it. Hopefully this is small enough. :) Thanks for removing my excuse for not looking at it. You must know how much I enjoy complist.c. (If anyone doesn't, I would be delighted to refresh their memory.) As always I don't really understand very much around here, but the point at which it's going wrong is when it's refreshing the screen to clear up the list. It seems that it needs a bit of prodding in the right direction to realise that it should be reinitialising the list rather than using what it last printed. I think. I'll commit this because I do *not* want to think any more about it; everyone is encouraged to give the menu selection code a good work out. Index: Src/Zle/complist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v retrieving revision 1.108 diff -u -r1.108 complist.c --- Src/Zle/complist.c 28 Feb 2008 23:12:37 -0000 1.108 +++ Src/Zle/complist.c 28 Mar 2008 23:14:08 -0000 @@ -53,7 +53,7 @@ * selected: Used to signal between domenucomplete() and menuselect() * that a selected entry has been found. Or something. * mlbeg: The first line of the logical array of all matches that - * fits on screen. + * fits on screen. Setting this to -1 forces a redraw. * mlend: The line after the last that fits on screen. * mscroll: 1 if the scrolling prompt is shown on screen. * mrestlines: The number of screen lines remaining to be processed. @@ -3216,6 +3216,15 @@ } } if (!noselect && (!dat || acc)) { + /* + * I added the following because in certain cases the zrefresh() + * here was screwing up the list. Forcing it to redraw the + * screen worked. The case in question (courtesy of + * "Matt Wozniski" ) is in zsh-workers/24756. + * + * *** PLEASE DON'T ASK ME WHY THIS IS NECESSARY *** + */ + mlbeg = -1; showinglist = ((validlist && !nolist) ? -2 : 0); onlyexpl = oe; if (!smatches) -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/