zsh-users
 help / color / mirror / code / Atom feed
From: Dave Woodfall <dave@tty1.uk>
To: zsh-users@zsh.org
Subject: Re: Is it possible to limit the height or rows of menus?
Date: Sun, 5 Apr 2020 23:13:32 +0100	[thread overview]
Message-ID: <20200405221332.GC9554@blackswan.r0t.uk> (raw)
In-Reply-To: <CAH+w=7aj=MviX5Vofr-XDn=EkHZh23=YhqB_q+ovKgn7b9a2Tg@mail.gmail.com>

On 2020-04-05 11:28,
Bart Schaefer <schaefer@brasslantern.com> put forth the proposition:
> On Sun, Apr 5, 2020 at 8:01 AM Dave Woodfall <dave@tty1.uk> 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

  reply	other threads:[~2020-04-05 22:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05 14:38 Dave Woodfall
2020-04-05 15:00 ` Dave Woodfall
2020-04-05 18:28   ` Bart Schaefer
2020-04-05 22:13     ` Dave Woodfall [this message]
2020-04-05 23:35       ` Dave Woodfall
2020-04-05 21:29   ` Dave Woodfall
2020-04-06  8:57     ` Dave Woodfall
2020-04-06 11:49     ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200405221332.GC9554@blackswan.r0t.uk \
    --to=dave@tty1.uk \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).