From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5353 invoked from network); 8 Nov 1999 08:24:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Nov 1999 08:24:26 -0000 Received: (qmail 29946 invoked by alias); 8 Nov 1999 08:24:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8587 Received: (qmail 29939 invoked from network); 8 Nov 1999 08:24:20 -0000 Date: Mon, 8 Nov 1999 09:24:14 +0100 (MET) Message-Id: <199911080824.JAA13035@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Clint Adams's message of Sun, 7 Nov 1999 22:09:50 -0500 Subject: Re: PATCH: line count imprecision in calclist() Clint Adams wrote: > ... > > You should now have a situation wherein you can type > > ls /tmp/xxxxx/yyy/zzzzz/ > > and find your cursor a line too high. Behavior is normal if no scrolling > occurs. If you rename the i+ file to something two characters shorter, > the cursor will be two lines too high. > > It seems to have something to do with > glines += 1 + ((1 + mlens[m->gnum]) / columns); > in calclist() when mlens[m->gnum] is 79 (and therefore glines += 2). > > > This seems to correct the problem.. > > --- compresult.c 1999/11/05 09:10:44 1.1.1.3 > +++ compresult.c 1999/11/08 03:05:58 > @@ -1287,7 +1287,7 @@ > if (!(m->flags & CMF_DISPLINE)) > glines += 1 + (mlens[m->gnum] / columns); > } else if (!(m->flags & CMF_NOLIST)) > - glines += 1 + ((1 + mlens[m->gnum]) / columns); > + glines += 1 + ((mlens[m->gnum]) / columns); > } > } > } > > However, it makes me uneasy that something will break elsewhere. No, I think that's ok (apart from: I couldn't apply the patch, due to some whitespace difference I guess, and apart from: the patch should have been relative to the toplevel directory -- always having to cd or to type paths when patch asks which file to patch is a bit annoying). Due to the way such matches are (or should be) printed, the `1 +' was indeed wrong, just the same as the line two lines above the one you changed. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de