mirror of
https://github.com/tmux/tmux.git
synced 2025-12-17 00:02:23 -05:00
Do not allow multiple line separators in a row.
This commit is contained in:
parent
93b1b78150
commit
0cb75f1332
2
menu.c
2
menu.c
@ -64,6 +64,8 @@ menu_add_item(struct menu *menu, const struct menu_item *item,
|
|||||||
line = (item == NULL || item->name == NULL || *item->name == '\0');
|
line = (item == NULL || item->name == NULL || *item->name == '\0');
|
||||||
if (line && menu->count == 0)
|
if (line && menu->count == 0)
|
||||||
return;
|
return;
|
||||||
|
if (line && menu->items[menu->count - 1].name == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
menu->items = xreallocarray(menu->items, menu->count + 1,
|
menu->items = xreallocarray(menu->items, menu->count + 1,
|
||||||
sizeof *menu->items);
|
sizeof *menu->items);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user