ui/ncurses: Clear remaining space when drawing help line
[petitboot] / ui / ncurses / nc-subset.c
index 8336725d8e39a103816f2e42eb881bcc4bc880f7..9ca3e8aacc8ddb777d990cca7ad6d51fce8720e5 100644 (file)
@@ -222,8 +222,11 @@ static void subset_screen_draw(struct subset_screen *screen)
        bool repost = false;
        int height;
 
-       /* Size of pad = top space + number of available options */
-       height = 1 + N_FIELDS + widget_subset_n_inactive(screen->options);
+       /*
+        * Size of pad = top space + 2 * number of available options in case
+        * device names wrap
+        */
+       height = 1 + N_FIELDS + widget_subset_n_inactive(screen->options) * 2;
 
        if (!screen->pad || getmaxy(screen->pad) < height) {
                if (screen->pad)
@@ -285,7 +288,7 @@ struct subset_screen *subset_screen_init(struct cui *cui,
                        title_suffix);
        screen->scr.frame.rtitle = NULL;
        screen->scr.frame.help = talloc_strdup(screen,
-                       _("tab=next, shift+tab=previous, x=exit, h=help"));
+                       _("tab=next, shift+tab=previous, x=exit"));
 
        scrollok(screen->scr.sub_ncw, true);