diff options
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r-- | Src/Zle/zle_thingy.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index f5acb73b4..dd2aea40d 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 }, + { 'K', bin_zle_keymap, 1, 1 }, { 'I', bin_zle_invalidate, 0, 0 }, { 0, bin_zle_call, 0, -1 }, }; @@ -465,6 +466,17 @@ bin_zle_unget(char *name, char **args, char *ops, char func) } /**/ +static int +bin_zle_keymap(char *name, char **args, char *ops, char func) +{ + if (!zleactive) { + zwarnnam(name, "can only be called from widget function", NULL, 0); + return 1; + } + return selectkeymap(*args, 0); +} + +/**/ static void scanlistwidgets(HashNode hn, int list) { |