zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Oliver Kiddle <okiddle@yahoo.co.uk>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Why the widget bound to menuselect isn't called?
Date: Sat, 13 Jul 2019 09:39:34 -0700	[thread overview]
Message-ID: <CAH+w=7b0ZfEuc4J7ZxdR8FD=QqO7iWWonV5sSFMcWMH9SNkJvg@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVDktOywqbY28eMgrha2pQ30QxO4eA7QdA1C5a54=8B99w@mail.gmail.com>

On Sat, Jul 13, 2019 at 5:20 AM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> The docs also say:
>
> "any other zle function  not  listed leaves menu selection and
> executes that function."
>
> so the widget should be apparently still plainly executed.

What you're missing is this bit:

Any key that is not defined in this keymap or that is bound to
`undefined-key' is looked up in the keymap currently selected.

That means you exit the menuselect keymap and return to the "current"
keymap before the binding for the keystroke is looked up; it doesn't
mean that the function looked up in the menuselect keymap is executed
after leaving.

> It seems to me that the main problem / idea is to replace the above
> check(s) which are keymap-specific to a more general solution

Menuselect is restricted in this way deliberately so that the user
can't perform any action that would garble the screen or confuse the
cursor placement.  The right thing would probably have been to create
a new set of widgets specific to menuselect and simply declare that
they couldn't be changed, but as a shortcut the most similar existing
actions were simply co-opted.

  parent reply	other threads:[~2019-07-13 16:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 20:55 Sebastian Gniazdowski
2019-07-12 18:44 ` Sebastian Gniazdowski
2019-07-12 19:36   ` Bart Schaefer
2019-07-13  1:23     ` Sebastian Gniazdowski
2019-07-13  2:29       ` Ben Klein
2019-07-13  8:59 ` Oliver Kiddle
2019-07-13 12:19   ` Sebastian Gniazdowski
2019-07-13 12:23     ` Sebastian Gniazdowski
2019-07-13 16:39     ` Bart Schaefer [this message]
2019-07-13 16:42       ` Bart Schaefer
2019-07-14 10:38     ` Oliver Kiddle
2019-07-14 21:56       ` Sebastian Gniazdowski

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='CAH+w=7b0ZfEuc4J7ZxdR8FD=QqO7iWWonV5sSFMcWMH9SNkJvg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=okiddle@yahoo.co.uk \
    --cc=sgniazdowski@gmail.com \
    --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).