summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2014-10-03 14:37:20 +1000
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2014-10-08 14:36:00 +1100
commitcd94ab94766ae863467195324fb84b3d020c96cf (patch)
tree24cd1203316d030625a42aa4f7ab2b68d6540690 /ui
parent0303df2c1d860cb0384b1d1c30729561ac2f2117 (diff)
downloadpetitboot-cd94ab94766ae863467195324fb84b3d020c96cf.zip
petitboot-cd94ab94766ae863467195324fb84b3d020c96cf.tar.gz
ui/ncurses: Warn if widget runs over horizontal pad width
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/ncurses/nc-widgets.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/ncurses/nc-widgets.c b/ui/ncurses/nc-widgets.c
index 5592db9..f821929 100644
--- a/ui/ncurses/nc-widgets.c
+++ b/ui/ncurses/nc-widgets.c
@@ -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)
OpenPOWER on IntegriCloud