aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2013-09-19 15:03:40 +0300
committerEli Zaretskii2013-09-19 15:03:40 +0300
commit9e30f0e14eb8e1e03f69f57ac4d060a0ca6eedf7 (patch)
tree7daecbbccce29cf6811ac36ceb555c8dee4813a4 /src
parentfa93733d3481c928112d13e31c30d7d36cfa6589 (diff)
downloademacs-9e30f0e14eb8e1e03f69f57ac4d060a0ca6eedf7.tar.gz
emacs-9e30f0e14eb8e1e03f69f57ac4d060a0ca6eedf7.zip
Fix a buglet in calculating menu width.
Diffstat (limited to 'src')
-rw-r--r--src/term.c4
1 files 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)
2893{ 2893{
2894 int i, h2, w2, maxsubwidth, maxheight; 2894 int i, h2, w2, maxsubwidth, maxheight;
2895 2895
2896 maxsubwidth = 0; 2896 maxsubwidth = menu->width;
2897 maxheight = menu->count; 2897 maxheight = menu->count;
2898 for (i = 0; i < menu->count; i++) 2898 for (i = 0; i < menu->count; i++)
2899 { 2899 {
@@ -2904,7 +2904,7 @@ tty_menu_calc_size (tty_menu *menu, int *width, int *height)
2904 if (i + h2 > maxheight) maxheight = i + h2; 2904 if (i + h2 > maxheight) maxheight = i + h2;
2905 } 2905 }
2906 } 2906 }
2907 *width = menu->width + maxsubwidth; 2907 *width = maxsubwidth;
2908 *height = maxheight; 2908 *height = maxheight;
2909} 2909}
2910 2910