]> git.ozlabs.org Git - petitboot/blobdiff - ui/ncurses/nc-widgets.c
ui/ncurses: Warn if widget runs over horizontal pad width
[petitboot] / ui / ncurses / nc-widgets.c
index 5592db9c7769a3c68fc03497776f469d208d0abc..f82192939dd968d1dfd4ce2f889cbb382b1d6d8b 100644 (file)
@@ -877,6 +877,10 @@ void widget_move(struct nc_widget *widget, int y, int x)
 
        widget->x = x;
        widget->y = y;
+
+       if (x + widget->width > COLS)
+               pb_debug("%s: Widget at %d,%d runs over pad! (%d)", __func__,
+                      y, x, x + widget->width);
 }
 
 int widget_height(struct nc_widget *widget)