Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] User-defined widgets can continue past push-line-or-edit



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