Ticket #4391: macropatch.diff

File macropatch.diff, 827 bytes (added by sxmboer2, 19 months ago)

this patch fixes the mis-placed bracket in the while loop leading to infinite looping

  • src/editor/editmacros.c

    diff --git a/src/editor/editmacros.c b/src/editor/editmacros.c
    index 9b18f1f6a..b5d2ff23e 100644
    a b edit_delete_macro (WEdit * edit, int hotkey) 
    104104    char *skeyname; 
    105105 
    106106    /* clear array of actions for current hotkey */ 
    107     while ((indx = edit_get_macro (edit, hotkey) != -1)) 
     107    while ((indx = edit_get_macro (edit, hotkey)) != -1) 
    108108    { 
    109109        macros_t *macros; 
    110110 
    111111        macros = &g_array_index (macros_list, struct macros_t, indx); 
    112112        g_array_free (macros->macro, TRUE); 
    113113        g_array_remove_index (macros_list, indx); 
    114         edit_macro_sort_by_hotkey (); 
     114//        edit_macro_sort_by_hotkey (); // not needed because remove_index keeps the array sorted 
    115115    } 
    116116 
    117117    macros_fname = mc_config_get_full_path (MC_MACRO_FILE);