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

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



On Jan 16,  6:54pm, Greg Klanderman wrote:
}
} Bart also made the following comments on my original patch which I
} have not addressed:
} 
} > it's possible that the zle-line-finish widget should not run when
} > errflag != 0.
} 
} > I don't know all the ramifications of the values of various globals
} > at the end of zlecore().  PWS?
} 
} Peter, could you comment?

One thing related to another thread is that zle-line-finish will run
when push-line-or-edit is used, between the push-input and get-line
stages.  zle-line-finish will also run *after* send-break, i.e., it
will run even if you interrupt editing with ^C.

Both of those would be avoided if zle-line-finish runs only when
errflag != 0.  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.



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