aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu
diff options
context:
space:
mode:
Diffstat (limited to 'com32/cmenu')
-rw-r--r--com32/cmenu/libmenu/menu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/com32/cmenu/libmenu/menu.c b/com32/cmenu/libmenu/menu.c
index dea19750..5a33a527 100644
--- a/com32/cmenu/libmenu/menu.c
+++ b/com32/cmenu/libmenu/menu.c
@@ -487,6 +487,12 @@ static pt_menuitem getmenuoption(pt_menu menu, uchar top, uchar left, uchar star
/* The handler may have changed the UI, reset it on exit */
reset_ui();
+ // Cleanup menu using old number of items
+ cleanupmenu(menu, top, left, numitems);
+ // Recalculate the number of items
+ numitems = calc_visible(menu, 0);
+ // Reprint the menu
+ printmenu(menu, curr, top, left, first, radio);
}
break;
}