Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: _rsync duplicated options in completion



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@xxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author