zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: zle -M doesn't work properly if the command line fills the screen
Date: Fri, 18 Oct 2019 18:23:12 +0200	[thread overview]
Message-ID: <CAHYJk3TQ3Kz+ynE+fiKbqMQUrY4DG9cde-phfb84LEDVGBHzEw@mail.gmail.com> (raw)

If you enter a very long command, and a widget tries to tell you
something, you won't see it, instead the topmost line of the screen is
just scrolled off and then an identical screen is redrawn immediately,
erasing the zle -M message. Completion is also almost useless in this
case, you won't see any of the options, and menu selection can't even
be entered.

reproduce:
% msg() zle -M hello; zle -N msg; bindkey M msg
press alt-10000 a (or make the terminal smaller), then hit M

More generally, it would be nice if you could set the amount of lines
zle will use for a command (even multiline ones); you might not always
want to fill the entire screen.

We already avoid drawing more than fits on the screen by using the
>.... <.... markers, so it should be possible to do the same with less
than the whole screen, but I couldn't quite figure out the code when I
looked at it.

-- 
Mikael Magnusson

                 reply	other threads:[~2019-10-18 16:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAHYJk3TQ3Kz+ynE+fiKbqMQUrY4DG9cde-phfb84LEDVGBHzEw@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@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).