From 0626be9e3c02ca9171cd4e0975c208e0c3d6ec2b Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 2 Oct 2015 20:41:49 +0200 Subject: unposted: define zle_usable before using it (reported in 36741) --- Src/Zle/zle_thingy.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'Src/Zle') diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index ba89e00a8..c6ef8e6a0 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -624,6 +624,23 @@ bin_zle_complete(char *name, char **args, UNUSED(Options ops), UNUSED(char func) return 0; } +/**/ +static int +zle_usable() +{ + return zleactive && !incompctlfunc && !incompfunc +#if 0 + /* + * PWS experiment: commenting this out allows zle widgets + * in signals, hooks etc. I'm not sure if this has a down side; + * it ought to be that zleactive is good enough to test whether + * widgets are callable. + */ + && sfcontext == SFC_WIDGET +#endif + ; +} + /**/ static int bin_zle_flags(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) @@ -666,23 +683,6 @@ bin_zle_flags(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) return ret; } -/**/ -static int -zle_usable() -{ - return zleactive && !incompctlfunc && !incompfunc -#if 0 - /* - * PWS experiment: commenting this out allows zle widgets - * in signals, hooks etc. I'm not sure if this has a down side; - * it ought to be that zleactive is good enough to test whether - * widgets are callable. - */ - && sfcontext == SFC_WIDGET -#endif - ; -} - /**/ static int bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) -- cgit 1.4.1