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

Re: PATCH: Re: 3.1.7-pre-1: Problem with scrolled completion listings



Bart Schaefer wrote:

> On Apr 26,  8:25am, Sven Wischnowsky wrote:
> } Subject: Re: PATCH: Re: 3.1.7-pre-1: Problem with scrolled completion list
> }
> } > However, I'm confused.  I don't want scrolling.  I have LISTMAX=100, not
> } > LISTMAX=scroll.  Yet still I get scrolling.
> } 
> } That's why I first didn't give the list-prompt style a default
> } value. It specifies both the prompt to use and that scrolling is used
> } at all.
> 
> But the doc still says to set LISTMAX=scroll (mod_complist.yo, lines
> 130-136) and doesn't say anything about _main_complete forcing it on
> (via compstate[list_max]=scroll) just because LISTPROMPT isn't empty,
> which appears to be what happens.
> 
> This looks like a case of the doc reflecting the C code in the complist
> module, but the completion system establishing a different default.  This
> is not good; there's no right way to document it.

Maybe we could change the C code to do the same the shell code does
now. I.e.: we turn LISTMAX back into a integer, remove the `scroll'
special value and turn list scrolling on only if $LISTPROMPT is
set. For $LISTPROMPT we already have the pointer to the new completion 
system and there we have documentation that it has a default value.
It would also make $LISTPROMPT more like $SELECTPROMPT: not set = no
prompt.

That plus the parameter renaming you suggested... would that make
everyone happy?

> } We had the suggestion to allow going back in completion lists.
> 
> I told you it was a bad idea to start implementing a pager. 

:-} Yes. We had requests from Andrej and Peter. But I prefer it, too,
makes my life easier.

One idea might be to add something that allows to turn on menu
selection when the list doesn't fit on the screen. A bit like
a mixture of SELECTMIN and LISTMAX, but not only meaning `*if* menu
completion is started *and*  there are at least N matches, start menu
selection', but meaning: `in any case (even if menu completion
wouldn't be started normally), if there are at least N matches or the
list takes N lines, start menu selection'.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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