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

Re: Is it possible to limit the height or rows of menus?



On 2020-04-05 11:28,
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> put forth the proposition:
> On Sun, Apr 5, 2020 at 8:01 AM Dave Woodfall <dave@xxxxxxx> wrote:
> >
> > LINES=15 zle complete-word
> >
> > It seems to work so far.
>
> This confuses ZLE a lot, as far as I can tell.  Try for example typing
> ^L to clear the screen, then do your completion, but instead of
> accepting the result, back out of the menu and try to edit the command
> line.

You are correct.  Using ^L or accepting the line, and probably other
things, prints the current selected entry twice at the prompt.

Scrolling off the end and back to the top eats the previous line.

> Currently the best thing here is to set LISTMAX or the corresponding
> zstyle list_max, to avoid entering the menu if it is going to scroll
> too far.
>
> Limiting the number of rows occupied by a listing seems like something
> that could be added, but it probably needs more care than simply
> making a temporary change to the value of the internal zterm_lines
> value, because the editor needs to know what the complist module has
> done to the screen.

I did try using LISTMAX, but it doesn't really help for what I want.
I'll try to find some other way.

--
Dave



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