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

Re: PATCH: add zle-line-finish special widget



>>>>> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:

> Refreshing my memory of the code a bit, I'm coming
> to the conclusion that the test should be:

>     if (done && !exit_pending && !errflag &&
>     	(initthingy = rthingy_nocreate("zle-line-finish"))) {

> At the very least it should check (done && !exit_pending), even if
> it ignores the state of errflag.

Either of those should be OK by me.. would you like me to
test one or the other a bit and re-submit the patch?

>>>>> Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> writes:

> I don't know if this is correct or not---it really depends what
> zle-line-finish is designed to do.  If it's a catch-all tidy up, it
> probably *should* run and then you probably should set errflag to 0
> after saving the surrounding value.

Right.. for my current use case it doesn't really matter whether it
runs in the error case or not.  I'm not sure which semantics is best
in general.  If one wanted to use it for some cleanup, or messing with
font colors or whatever, you might want it to run always.

thanks,
Greg



Messages sorted by: Reverse Date, Date, Thread, Author