[1/2] menuconfig: fix to center checklist correctly in a corner case
diff mbox

Message ID 4C0758B7.5070907@cn.fujitsu.com
State New, archived
Headers show

Commit Message

Li Zefan June 3, 2010, 7:24 a.m. UTC
None

Patch
diff mbox

diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index bcc6f19..c92a05a 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -175,6 +175,7 @@  do_resize:
 	check_x = 0;
 	item_foreach()
 		check_x = MAX(check_x, strlen(item_str()) + 4);
+	check_x = MIN(check_x, list_width);
 
 	check_x = (list_width - check_x) / 2;
 	item_x = check_x + 4;