unposted: define zle_usable before using it (reported in 36741)

This commit is contained in:
Mikael Magnusson 2015-10-02 20:41:49 +02:00
parent e3bc9aa228
commit 0626be9e3c

View file

@ -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))