diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 732869394..ef2dcfa50 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele New features:: + * core: ignore key bindings with empty command * core: add support of quotes in commands `/key bind` and `/key bindctxt` * core: evaluate command given to `/repeat` with contextual variables (issue #2007) * core: add option `callbacks` in command `/debug` diff --git a/src/gui/gui-key.c b/src/gui/gui-key.c index 2085c5fe5..6602e141c 100644 --- a/src/gui/gui-key.c +++ b/src/gui/gui-key.c @@ -1653,6 +1653,10 @@ gui_key_search_part (struct t_gui_buffer *buffer, int context, for (ptr_key = (buffer) ? buffer->keys : gui_keys[context]; ptr_key; ptr_key = ptr_key->next_key) { + /* ignore keys with no command */ + if (!ptr_key->command || !ptr_key->command[0]) + continue; + if (ptr_key->key && ((context != GUI_KEY_CONTEXT_CURSOR) || (ptr_key->key[0] != '@')))