To reproduce:
create a macro, e.g. CTRL-R abc CTRL-R a
remove that macro, e.g. CTRL-R CTRL-R a (or use the menu to delete that
macro)
The problem was introduced because of the split of the macro functions
with some rewrites and optimizations. I am including a patch that also
gets rid of the unnecessary resorting of the macro array. The glib
function called keeps the array sorted.
Another thought is that the while construction can be replaced with a
single if. In principle it is impossible to have more than one macro with
the same hotkey.
--
Ticket URL: <http://www.midnight-commander.org/ticket/4391>
Midnight Commander <https://midnight-commander.org>
Midnight Development Center
* status: new => accepted
* owner: => andrew_b
--
Ticket URL: <http://www.midnight-commander.org/ticket/4391#comment:1>
* branch_state: no branch => on review
Comment:
Thanks!
I've split your patch to two commits.
Branch:4391_edit_delete_macro
Initial changeset:c90840d5c7f577f453f8cc810527d078080e41e9
--
Ticket URL: <http://www.midnight-commander.org/ticket/4391#comment:2>
* votes: => andrew_b
* branch_state: on review => approved
--
Ticket URL: <http://www.midnight-commander.org/ticket/4391#comment:3>
* status: accepted => testing
* votes: andrew_b => committed-master
* resolution: => fixed
* branch_state: approved => merged
Comment:
Merged to master: [1c31e57c74b533c4d54e4a1bdd8dd1684c7ef86f].
{{{
git log --pretty=oneline 82da1e88c..1c31e57c7
}}}
--
Ticket URL: <http://www.midnight-commander.org/ticket/4391#comment:4>
* status: testing => closed
--
Ticket URL: <http://www.midnight-commander.org/ticket/4391#comment:5>