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

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



On Thu, 22 Jan 2009 19:50:51 -0500
Greg Klanderman <gak@xxxxxxxxxxxxxx> wrote:
> >>>>> 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?

That what probably be sensible

> >>>>> 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.

For now it sounds like you should leave it as it is.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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