The nc-subset screen can exceed its maximum height if some options are
long enough to wrap around to two lines. Increaes the maximum size of
the pad to account for every line potentially wrapping once.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
bool repost = false;
int height;
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)
if (!screen->pad || getmaxy(screen->pad) < height) {
if (screen->pad)