diff --git a/src/ncurses.cc b/src/ncurses.cc index 207da1e2..b80558fb 100644 --- a/src/ncurses.cc +++ b/src/ncurses.cc @@ -478,7 +478,7 @@ void NCursesUI::menu_show(memoryview items, int line = (int)anchor.line + 1; if (line + height >= (int)maxsize.line) line = (int)anchor.line - height; - m_selected_item = 0; + m_selected_item = item_count; m_menu_top_line = 0; int width = is_prompt ? (int)maxsize.column : (int)longest;