diff options
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r-- | Src/Zle/zle_thingy.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index 7e81e2f88..f5acb73b4 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -339,6 +339,7 @@ bin_zle(char *name, char **args, char *ops, int func) { 'R', bin_zle_refresh, 0, -1 }, { 'M', bin_zle_mesg, 1, 1 }, { 'U', bin_zle_unget, 1, 1 }, + { 'I', bin_zle_invalidate, 0, 0 }, { 0, bin_zle_call, 0, -1 }, }; struct opn const *op, *opp; @@ -396,10 +397,8 @@ bin_zle_refresh(char *name, char **args, char *ops, char func) char *s = statusline; int sl = statusll, ocl = clearlist; - if (!zleactive) { - zwarnnam(name, "can only be called from widget function", NULL, 0); + if (!zleactive) return 1; - } statusline = NULL; statusll = 0; if (*args) { @@ -656,6 +655,17 @@ bin_zle_call(char *name, char **args, char *ops, char func) return ret; } +/**/ +static int +bin_zle_invalidate(char *name, char **args, char *ops, char func) +{ + if (zleactive) { + trashzle(); + return 0; + } else + return 1; +} + /*******************/ /* initialiasation */ /*******************/ |