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

Re: Add a hook on isearch



On 18 September 2010 22:00, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sep 18,  6:50pm, Mikael Magnusson wrote:
> }
> } This might make something explode, but it's probably pretty useful.
>
> Maybe it's time for a callhookzle() to go with callhookfunc() and
> runhookdef()?
>
> }      ref:
> } +        if ((cmd = rthingy_nocreate("zle-isearch-update"))) {
> } +           char *args[2];
> } +           args[0] = cmd->nam;
> } +           args[1] = NULL;
> } +           execzlefunc(cmd, args, 1);
> } +           unrefthingy(cmd);
> } +        }
> } +
>
> Seems like there's some global state management that this might not
> be doing with respect to errflag and retflag.

I did something similar on that patch i just linked to on users that
runs on every buffer refresh, and that subtly breaks ^r searching, so
I guess this might have similar problems. Unfortunately (for me) I
just wrote "some static variables" in that mail, so who knows which
ones it actually is... :).

-- 
Mikael Magnusson



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