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

Re: Bad effect of error in zle-line-pre-redraw



On Sat, Nov 12, 2016 at 9:41 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Nov 12,  6:54pm, Mikael Magnusson wrote:
> }
> } There are many many more ways to break a shell session, surely.
>
> Of course; e.g. just doing
>
> zle -N self-insert this-does-not-exist
>
> My point was more about the difference in behavior from the other hooks
> than about the session being broken.  zle-line-pre-redraw does not use
> zlecallhook(), but zlecallhook() resets errflag except for interrupts.
>
>
> Why did you avoid zlecallhook(), again?

IIRC, and looking at the code, it needed to save more stuff around
calling the hook function. I think when I wrote the code,
zlecallhook() didn't exist, and the similar places I borrowed the code
from didn't have the errflag resetting. It does seem pretty likely
that restoring the errflag won't hurt.

-- 
Mikael Magnusson



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