From 917c38af204593ac27cbfec3a20e5ceaf789b19a Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 24 May 2010 16:43:39 -0700 Subject: [PATCH] adjust menu start position: zinx --- ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui.c b/ui.c index 5ea4e42..039043e 100644 --- a/ui.c +++ b/ui.c @@ -527,11 +527,11 @@ int ui_menu_select(int sel) { if (menu_sel < menu_show_start && menu_show_start > 0) { - menu_show_start--; + menu_show_start = menu_sel; } if (menu_sel - menu_show_start + menu_top >= text_rows) { - menu_show_start++; + menu_show_start = menu_sel + menu_top - text_rows + 1; } sel = menu_sel;