We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cede73e commit fe9dce3Copy full SHA for fe9dce3
src/popup.c
@@ -267,6 +267,9 @@ static bool popup_contains_item(struct popup* popup, struct bar_item* bar_item)
267
268
void popup_add_item(struct popup* popup, struct bar_item* bar_item) {
269
if (popup_contains_item(popup, bar_item)) return;
270
+ if (bar_item->parent) {
271
+ popup_remove_item(&bar_item->parent->popup, bar_item);
272
+ }
273
popup->num_items++;
274
popup->items = realloc(popup->items,
275
sizeof(struct bar_item*)*popup->num_items);
0 commit comments