From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19470 invoked from network); 27 Feb 2004 01:09:13 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 27 Feb 2004 01:09:13 -0000 Received: (qmail 18163 invoked by alias); 27 Feb 2004 01:09:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19474 Received: (qmail 18106 invoked from network); 27 Feb 2004 01:09:07 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 27 Feb 2004 01:09:07 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [203.24.36.2] by sunsite.dk (MessageWall 1.0.8) with SMTP; 27 Feb 2004 1:9:6 -0000 Received: (qmail 29622 invoked by uid 8); 27 Feb 2004 01:09:04 -0000 To: zsh-workers@sunsite.dk Path: not-for-mail From: Geoff Wing X-Newsgroups: lists.zsh.workers Subject: Re: [bug] completion makes input jump up one line Date: Fri, 27 Feb 2004 01:09:03 +0000 (UTC) Organization: PrimeNet Computer Consultants Message-ID: References: Reply-To: mason@primenet.com.au NNTP-Posting-Host: sparkles.primenet.com.au X-Trace: coral.primenet.com.au 1077844143 23978 203.43.15.10 (27 Feb 2004 01:09:03 GMT) X-Complaints-To: usenet@coral.primenet.com.au NNTP-Posting-Date: Fri, 27 Feb 2004 01:09:03 +0000 (UTC) User-Agent: slrn/0.9.8.0 (NetBSD) Geoff Wing typed: : Mikael Magnusson typed: :: under 4.1, if i tabcomplete, and one of the matches in the list is a=20 :: multiple of $COLUMNS, ie, if the last letter of the match is in the=20 :: rightmost column, the whole thing jumps up one line. i confirmed it with=20 :: caphuso on #zsh, it happens in 4.1, but not 4.0 : : I can reproduce this with: : % zsh -f : % setopt alwayslastprompt : I'm guessing the calculation in calclist() needs correction. Does this look right? --- Zle/compresult.c 6 Feb 2003 10:29:34 -0000 1.48 +++ Zle/compresult.c 27 Feb 2004 01:02:01 -0000 @@ -1573,10 +1573,10 @@ if (!(m->flags & CMF_HIDE)) { if (m->disp) { if (!(m->flags & CMF_DISPLINE)) - glines += 1 + (mlens[m->gnum] / columns); + glines += 1 + ((mlens[m->gnum] - 1) / columns); } else if (showall || !(m->flags & (CMF_NOLIST | CMF_MULT))) - glines += 1 + ((mlens[m->gnum]) / columns); + glines += 1 + (((mlens[m->gnum]) - 1) / columns); } } }