]> git.ozlabs.org Git - petitboot/commit - ui
ui/ncurses: Ensure that the selected menu item is visible
authorJeremy Kerr <jk@ozlabs.org>
Mon, 3 Mar 2014 10:15:31 +0000 (18:15 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 3 Mar 2014 10:15:31 +0000 (18:15 +0800)
commit67d0ca0764e5ab9a0d0e5baa5bf062d0ac5c8596
treed9cbfa9de19a06bfcd7b633884202041974361e8
parent5a604632c54671d65ccb3398a928c0c38c5f13ad
ui/ncurses: Ensure that the selected menu item is visible

When adding new items to the petitboot menu, we need to ensure that the
scroll position of the menu includes the currently-selected item.

This change adds a call to set_top_row, calculated from the selected
item index, and the number of rows in the menu.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-cui.c