ui/ncurses: Clear remaining space when drawing help line
[petitboot] / ui / ncurses / nc-subset.c
index 0faed3b1d6f1b510fdaa9872f81ab69099c8d4af..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)