Merge branch '2586_mcedit_extended_keybindings'

* 2586_mcedit_extended_keybindings:
  Changed type of WEdit::extmod from integer to gboolean.
  Extended shortcuts like 'ctrl-x x' are unavailable in editor.
  Ticket #2586: broken extended keybindings in editor.
This commit is contained in:
Andrew Borodin 2011-08-26 10:31:54 +04:00
commit eb13abc437
4 changed files with 5 additions and 5 deletions

View File

@ -331,7 +331,7 @@ SelectCodepage = alt-e
Options =
OptionsSaveMode =
LearnKeys =
ExtendedKeyMap = ctrl-x
ExtendedKeyMap =
[viewer]
Help = f1

View File

@ -132,7 +132,7 @@ struct WEdit
/* line break */
LineBreaks lb;
int extmod;
gboolean extmod;
char *labels[10];

View File

@ -4160,7 +4160,7 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
edit_begin_end_repeat_cmd (edit);
break;
case CK_ExtendedKeyMap:
edit->extmod = 1;
edit->extmod = TRUE;
break;
default:
break;

View File

@ -79,7 +79,7 @@ edit_translate_key (WEdit * edit, long x_key, int *cmd, int *ch)
int c;
/* an ordinary insertable character */
if (x_key < 256)
if (!edit->extmod && x_key < 256)
{
#ifdef HAVE_CHARSET
if (edit->charpoint >= 4)
@ -183,7 +183,7 @@ edit_translate_key (WEdit * edit, long x_key, int *cmd, int *ch)
/* Commands specific to the key emulation */
if (edit->extmod)
{
edit->extmod = 0;
edit->extmod = FALSE;
command = keybind_lookup_keymap_command (editor_x_map, x_key);
}
else