]> git.ozlabs.org Git - petitboot/blobdiff - ui/ncurses/nc-boot-editor.c
ui/ncurses: Clear remaining space when drawing help line
[petitboot] / ui / ncurses / nc-boot-editor.c
index 7fa1a42f0eddfbc07794b9f003c4dbfd330dfac6..5b098a4bc6f87eb2c987c1aa691a29989424640b 100644 (file)
@@ -162,7 +162,8 @@ static char *conditional_prefix(struct pb_boot_data *ctx,
        sep = "";
        if (!prefix)
                prefix = "";
-       else if (prefix[strlen(prefix)] != '/')
+       else if ((prefix[strlen(prefix) - 1] != '/') &&
+                               (value[0] != '/'))
                sep = "/";
 
        return talloc_asprintf(ctx, "%s%s%s", prefix, sep, value);
@@ -309,7 +310,7 @@ static int layout_pair(struct boot_editor *boot_editor, int y,
 
 static int pad_height(int blockdevs_height)
 {
-       return 10 + blockdevs_height;
+       return 10 + (2 * blockdevs_height);
 }
 
 static void boot_editor_layout_widgets(struct boot_editor *boot_editor)