diff options
author | nicm <nicm> | 2022-02-01 11:52:08 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-02-01 11:52:08 +0000 |
commit | 770d28b8c517fd87621ea3e8d6d7bdc4f35b3a94 (patch) | |
tree | f164ba6c750c51c47266324cda60dd3034f942f5 /menu.c | |
parent | a6b361e775e0bf6301284391e75dd9af7af340da (diff) |
Do not overflow width when not enough space.
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -81,6 +81,8 @@ menu_add_item(struct menu *menu, const struct menu_item *item, menu->count--; return; } + if (c->tty.sx <= 4) + return; max_width = c->tty.sx - 4; slen = strlen(s); |