From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7810 invoked from network); 21 May 2002 07:38:15 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 May 2002 07:38:15 -0000 Received: (qmail 2872 invoked by alias); 21 May 2002 07:38:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17190 Received: (qmail 2861 invoked from network); 21 May 2002 07:38:05 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15593.63815.145833.101936@wischnow.berkom.de> Date: Tue, 21 May 2002 09:37:43 +0200 To: zsh-workers@sunsite.dk Subject: PATCH: Re: _rsync duplicated options in completion In-Reply-To: <1020516171040.ZM19537@candle.brasslantern.com> References: <20020516021810.GA32147@dman.com> <1020516171040.ZM19537@candle.brasslantern.com> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid Bart Schaefer wrote: > ... > > There additionally seems to be a navigation problem with menu selection. > Complete after `rsync --' (so that all combinations of options are in > the menu) and then begin scrolling down. On an 80-column terminal, you > ventually come to a place where a blank line appears in the display. If > you scroll down across this, you can't scroll back up again; rather you > have to cycle off the bottom to get back to the top. There was an obiwan-error: lines could get exactly $COLUMNS characters long, caused the known display bug (we still don't have the code to portably output in the last column, do we?). I wanted the code to avoid that, but... Bye Sven Index: Src/Zle/computil.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v retrieving revision 1.78 diff -u -r1.78 computil.c --- Src/Zle/computil.c 14 May 2002 08:01:19 -0000 1.78 +++ Src/Zle/computil.c 21 May 2002 07:37:45 -0000 @@ -579,8 +579,8 @@ memset(buf, ' ', cd_state.pre); memcpy(buf, str->str, str->len); strcpy(sufp, str->desc); - if (strlen(buf) >= columns) - buf[columns] = '\0'; + if (strlen(buf) >= columns - 1) + buf[columns - 1] = '\0'; *dp++ = ztrdup(buf); } *mp = *dp = NULL; -- Sven Wischnowsky wischnow@berkom.de