(edit_load_macro_cmd): reduce variable scope.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2023-05-26 20:33:54 +03:00
parent ef2172ee5a
commit 8a0f00ae6f
1 changed files with 5 additions and 3 deletions

View File

@ -249,7 +249,6 @@ edit_load_macro_cmd (WEdit * edit)
{
int hotkey;
GArray *macros = NULL;
macros_t macro;
values = mc_config_get_string_list (macros_config, section_name, *profile_keys, NULL);
hotkey = tty_keyname_to_keycode (*profile_keys, NULL);
@ -296,8 +295,11 @@ edit_load_macro_cmd (WEdit * edit)
if (macros != NULL)
{
macro.hotkey = hotkey;
macro.macro = macros;
macros_t macro = {
.hotkey = hotkey,
.macro = macros
};
g_array_append_val (macros_list, macro);
}