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

Re: Bug? in complist when filenames are longer than the screen

    Hi Andrey :)

 * Andrey Borzenkov <arvidjaar@xxxxxxxxxx> dixit:
> On Tuesday 04 October 2005 21:13, DervishD wrote:
> >     I'm going to make another test, using a clean environment. OK,
> > here are the results with the UNPATCHED version of zsh: if I use very
> > long names (much longer than COLUMNS), the bug doesn't happen!. It
> > only happens with a list of files in one directory :??? Mmm,
> > interesting, it looks like a corner case: the bug only happens when
> > in the file listing is there a file whose name length is *exactly*
> > $COLUMNS. Longer or shorter files doesn't cause the bug to happen.
> Yes, this was claimed to have been fixed at least twice. It has
> something to do with terminals (not) going to next line when
> getting NL in the last position.

    That's interesting, because it would explain another problem I'm
having, where the last character of a line exactly $COLUMNS long is
overwritten by the first character of PS1 if it is not followed by a
newline. OTOH, printing such line and printing a character afterwards
leads the correct result, that is, the character is printed in the
following line.
> >     I've found the bug to be repeatable with this sequence (try this
> > in a clean zsh environment, no /etc/zshenv, no any other rcfile, and
> > it must be a login shell, just to make sure):
> >
> >     $ rm -rf test
> >     $ mkdir test ; cd test
> >     $ PS1=
> >     $ touch ${(l:$COLUMNS::a:):-} a b c
> >     $ zmodload zsh/complist
> >     $ MENUSELECT=0
> >
> >     It's very important to create the other three files (a, b and c)
> > in the directory (otherwise you won't get a list ;)).
> >
> >     This causes a crash, always, without looping, even with your
> > patches.
> Does it happen only in current CVS or in older versions too?

    In fact I don't know if it happens in current CVS, I've just
tested in 4.2.5

    Raúl Núñez de Arenas Coronado

Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...

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