diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-06 22:13:01 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-06 22:13:01 +0200 |
commit | 00d253e2b2f435a5386582c3f857008e7ac355c2 (patch) | |
tree | 71bbea4e4c6efa593a85266e445d82377a65f454 /src/gui_athena.c | |
parent | ee4e0c1e9a81cb5d96e0060203a9033c2f28588e (diff) |
patch 8.2.0523: loops are repeatedv8.2.0523
Problem: Loops are repeated.
Solution: Use FOR_ALL_ macros. (Yegappan Lakshmanan, closes #5882)
Diffstat (limited to 'src/gui_athena.c')
-rw-r--r-- | src/gui_athena.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui_athena.c b/src/gui_athena.c index 99c7a67cba..6a64de5c11 100644 --- a/src/gui_athena.c +++ b/src/gui_athena.c @@ -954,7 +954,7 @@ gui_mch_new_menu_font(void) vimmenu_T *mp; int max_height = 9999; - for (mp = root_menu; mp != NULL; mp = mp->next) + FOR_ALL_MENUS(mp) { if (menu_is_menubar(mp->dname)) { @@ -1280,7 +1280,7 @@ gui_mch_show_toolbar(int showit) vimmenu_T *toolbar; vimmenu_T *cur; - for (toolbar = root_menu; toolbar; toolbar = toolbar->next) + FOR_ALL_MENUS(toolbar) if (menu_is_toolbar(toolbar->dname)) break; // Assumption: toolbar is NULL if there is no toolbar, @@ -1632,7 +1632,7 @@ gui_athena_popup_callback( { vimmenu_T *i; - for (i = menu->parent->children; i != NULL; i = i->next) + FOR_ALL_CHILD_MENUS(menu->parent, i) { if (i->submenu_id != NULL && XtIsManaged(i->submenu_id)) XtPopdown(i->submenu_id); |