mirror of
https://github.com/zsh-users/zsh
synced 2024-10-01 13:44:44 +00:00
unposted: define zle_usable before using it (reported in 36741)
This commit is contained in:
parent
e3bc9aa228
commit
0626be9e3c
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue