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 <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2018-02-09 09:14:56 +03:00
parent c9ca0cc01b
commit c139ba72ae

View File

@ -811,13 +811,18 @@ edit_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v
if (!e->extmod) if (!e->extmod)
command = keybind_lookup_keymap_command (editor_map, parm); command = keybind_lookup_keymap_command (editor_map, parm);
else else
{
e->extmod = FALSE;
command = keybind_lookup_keymap_command (editor_x_map, parm); 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); 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;
}
} }
/* /*