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 23:13,
Dave Woodfall <dave@xxxxxxx> put forth the proposition:
> 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.

Resetting LINES afterwards fixes ^L and the printing of the selected
word twice, but it doesn't stop the previous line from being eaten:

_vi-tab() {
	local OLDLINES=$LINES
	LINES=15
	zle complete-word
	local LINES=$OLDLINES
}

I'm not sure why it only works by setting a local LINES at the end,
but it seems to be the only combination that works.

--
Dave



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