mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Merge branch '4391_edit_delete_macro'
* 4391_edit_delete_macro: (edit_delete_macro): do not resort macros after deleting one Ticket #4391: fix infinite loop when deleting an mceditor macro.
This commit is contained in:
commit
1c31e57c74
@ -104,14 +104,13 @@ edit_delete_macro (WEdit * edit, int hotkey)
|
|||||||
char *skeyname;
|
char *skeyname;
|
||||||
|
|
||||||
/* clear array of actions for current hotkey */
|
/* clear array of actions for current hotkey */
|
||||||
while ((indx = edit_get_macro (edit, hotkey) != -1))
|
while ((indx = edit_get_macro (edit, hotkey)) != -1)
|
||||||
{
|
{
|
||||||
macros_t *macros;
|
macros_t *macros;
|
||||||
|
|
||||||
macros = &g_array_index (macros_list, struct macros_t, indx);
|
macros = &g_array_index (macros_list, struct macros_t, indx);
|
||||||
g_array_free (macros->macro, TRUE);
|
g_array_free (macros->macro, TRUE);
|
||||||
g_array_remove_index (macros_list, indx);
|
g_array_remove_index (macros_list, indx);
|
||||||
edit_macro_sort_by_hotkey ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
macros_fname = mc_config_get_full_path (MC_MACRO_FILE);
|
macros_fname = mc_config_get_full_path (MC_MACRO_FILE);
|
||||||
|
Loading…
Reference in New Issue
Block a user