From c139ba72aeeae23a68af5aea84ec946bec442358 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Fri, 9 Feb 2018 09:14:56 +0300 Subject: [PATCH] Ticket #3897: mcedit: broken extended key mode. (edit_dialog_callback): do not reset the extended mode if command was not handled. Signed-off-by: Andrew Borodin --- src/editor/editwidget.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index eb0c349b2..a6b02b16f 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -811,13 +811,18 @@ edit_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v if (!e->extmod) command = keybind_lookup_keymap_command (editor_map, parm); else - { - e->extmod = FALSE; command = keybind_lookup_keymap_command (editor_x_map, parm); - } - if (command != CK_IgnoreKey) + if (command == CK_IgnoreKey) + e->extmod = FALSE; + else + { ret = edit_dialog_command_execute (h, command); + /* if command was not handled, keep the extended mode + for the further key processing */ + if (ret == MSG_HANDLED) + e->extmod = FALSE; + } } /*