Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] User-defined widgets can continue past push-line-or-edit
- X-seq: zsh-workers 52158
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] User-defined widgets can continue past push-line-or-edit
- Date: Mon, 18 Sep 2023 07:20:58 -0700
- Archived-at: <https://zsh.org/workers/52158>
- In-reply-to: <CAH+w=7Z5RwgjrXjRhYR5rsSKTP4oN=xHSd5sWf2TTybk5xbSvA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Z5RwgjrXjRhYR5rsSKTP4oN=xHSd5sWf2TTybk5xbSvA@mail.gmail.com>
On Sun, Sep 17, 2023 at 2:55 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> With this patch, the current user-defined widget may continue
> executing through to either normal return or until another widget that
> ends the ZLE session (such as accept-line) is called. However, this
> is not transitive, that is, if user-defined widget X uses "zle Y" and
> Y is a user-defined widget that calls push-line-or-edit, then X will
> stop immediately after Y returns.
Evidently I fooled myself with my test case on this one. I thought
that errflag nonzero would prevent any further commands from executing
in the calling function X, but the use of a new flag value avoids
that, so X proceeds.
However, the accept-* family are not the only other widgets that can
have confusing side-effects if run after push-line-or-edit, most
obviously get-line.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author