mirror of
https://github.com/tmux/tmux.git
synced 2024-11-17 18:08:51 +00: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');
|
||||
if (line && menu->count == 0)
|
||||
return;
|
||||
if (line && menu->items[menu->count - 1].name == NULL)
|
||||
return;
|
||||
|
||||
menu->items = xreallocarray(menu->items, menu->count + 1,
|
||||
sizeof *menu->items);
|
||||
|
Loading…
Reference in New Issue
Block a user