summaryrefslogtreecommitdiffstats
path: root/src/gui_motif.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-06 22:13:01 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-06 22:13:01 +0200
commit00d253e2b2f435a5386582c3f857008e7ac355c2 (patch)
tree71bbea4e4c6efa593a85266e445d82377a65f454 /src/gui_motif.c
parentee4e0c1e9a81cb5d96e0060203a9033c2f28588e (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_motif.c')
-rw-r--r--src/gui_motif.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui_motif.c b/src/gui_motif.c
index d5a627609a..28b080a4a8 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -889,7 +889,7 @@ do_set_mnemonics(int enable)
{
vimmenu_T *menu;
- for (menu = root_menu; menu != NULL; menu = menu->next)
+ FOR_ALL_MENUS(menu)
if (menu->id != (Widget)0)
XtVaSetValues(menu->id,
XmNmnemonic, enable ? menu->mnemonic : NUL,
@@ -1094,7 +1094,7 @@ gui_mch_compute_menu_height(
// Find any menu Widget, to be able to call XtManageChild()
else
- for (mp = root_menu; mp != NULL; mp = mp->next)
+ FOR_ALL_MENUS(mp)
if (mp->id != (Widget)0 && menu_is_menubar(mp->name))
{
id = mp->id;
@@ -1112,7 +1112,7 @@ gui_mch_compute_menu_height(
* Now find the menu item that is the furthest down, and get its position.
*/
maxy = 0;
- for (mp = root_menu; mp != NULL; mp = mp->next)
+ FOR_ALL_MENUS(mp)
{
if (mp->id != (Widget)0 && menu_is_menubar(mp->name))
{
@@ -2928,7 +2928,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,