From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 632ed7b1 for ; Sat, 13 Jul 2019 16:40:34 +0000 (UTC) Received: (qmail 8121 invoked by alias); 13 Jul 2019 16:40:24 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24058 Received: (qmail 13037 invoked by uid 1010); 13 Jul 2019 16:40:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-lj1-f176.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25503. spamassassin: 3.4.2. Clear:RC:0(209.85.208.176):SA:0(-1.9/5.0):. Processed in 3.443961 secs); 13 Jul 2019 16:40:24 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.208.176 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1fLnEVJmiPev8gMDn9peKx1lz9ncBDlPFvrtJhxIdy0=; b=xLujD2v6Hu9w2vvd4dFsIKpTXz78SbbIKaigtUyDQCG6aHsbKrun7wl/7/sok4vc1b PTRoi1c50IRm0OG33kmLo6yunyr46XKEzyZcXeRsdpZNxI7vbsV/OFWMVZyaazYZCiPg NqKPh0ztH3HQb84myH4kv3xFSij4N9mEjGr3GgdPOHoqYELbARlz+m53omSJLEIyGfqt LhbYCzZx6SYuRWzfHTvOgJp2mtxpqRGNLd7U0sk7KzOviBubEBGXU/FKTqo4Dz24qS1Q IcsD6m9ZfCkWTYYVYNNXP5n8LpI4tvkyR7VmFQ/LDxYwr4ovRVvXh5fmTzBjrw/hfuU9 aHzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1fLnEVJmiPev8gMDn9peKx1lz9ncBDlPFvrtJhxIdy0=; b=EHVYObdNKBUuObRJ8qP1jPsv631RyixmYywDPB0cV6mPV52DDEkr1+wch/xB9jgbIR /4o8COLmcBIdfk4b77DuR7miQqt9fg9Kcjfi65P4wHW61LUqYHQhYr0ZhDFgH7BjzrZs f6wB6uG98BR8kSRGyj2MKn5neM3Ne2lG3mKgJUW4Z5fSJgPsuKvBpwt4i8eDCII2ia/X Vy+uj2TKCHGOAMEH4s0Vr6tQMBEfgA65jqhOTBaNe+ekruvA/A30Ei0u5StGGhM5D3ox 0fCapp+tPztNtyP0nQZLn2w21w7zjcpnKq+MzPF5h7aMggfQ8llz/5lGGJDo23+K2SK3 +h2g== X-Gm-Message-State: APjAAAW/FXRs/odZKiLXO9VdPzVlpWeYAUJ0bJxmHYS+233hB55Uq9ke oRQwOzXAeVQiMfyYx8MEvvkkj6AIpVbZs/RSG+4= X-Google-Smtp-Source: APXvYqzFvaZ2ELnsEMXa0IFVL4HI3323myGXvQQVn1IUPQNB1QkksggCKlLccgsUr1dCBeOyyNRzu5p+hPJHxDRwzpk= X-Received: by 2002:a2e:2d12:: with SMTP id t18mr9339100ljt.175.1563035985648; Sat, 13 Jul 2019 09:39:45 -0700 (PDT) MIME-Version: 1.0 References: <33999-1563008359.364082@ccgB.SxHS.A_VB> In-Reply-To: From: Bart Schaefer Date: Sat, 13 Jul 2019 09:39:34 -0700 Message-ID: Subject: Re: Why the widget bound to menuselect isn't called? To: Sebastian Gniazdowski Cc: Oliver Kiddle , Zsh Users Content-Type: text/plain; charset="UTF-8" On Sat, Jul 13, 2019 at 5:20 AM Sebastian Gniazdowski 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.