From 9e30f0e14eb8e1e03f69f57ac4d060a0ca6eedf7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 19 Sep 2013 15:03:40 +0300 Subject: [PATCH] Fix a buglet in calculating menu width. --- src/term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/term.c b/src/term.c index 451d608842d..553cc1b6084 100644 --- a/src/term.c +++ b/src/term.c @@ -2893,7 +2893,7 @@ tty_menu_calc_size (tty_menu *menu, int *width, int *height) { int i, h2, w2, maxsubwidth, maxheight; - maxsubwidth = 0; + maxsubwidth = menu->width; maxheight = menu->count; for (i = 0; i < menu->count; i++) { @@ -2904,7 +2904,7 @@ tty_menu_calc_size (tty_menu *menu, int *width, int *height) if (i + h2 > maxheight) maxheight = i + h2; } } - *width = menu->width + maxsubwidth; + *width = maxsubwidth; *height = maxheight; } -- 2.39.2