1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

core: fix renaming of options with command /item rename (issue #1978)

The options `weechat.custom_bar_item.xxx.*` are now properly renamed to the new
item name.

This fixes a save issue (item saved with old name in config) and a crash if a
new item is created with the old name.
This commit is contained in:
Sébastien Helleu
2023-07-10 07:31:28 +02:00
parent 6e7fe96046
commit ea934864d4
3 changed files with 42 additions and 3 deletions
@@ -455,6 +455,9 @@ TEST(GuiBarItemCustom, Rename)
CHECK(new_item->bar_item);
STRCMP_EQUAL("test3", new_item->bar_item->name);
STRCMP_EQUAL("test3.conditions", new_item->options[GUI_BAR_ITEM_CUSTOM_OPTION_CONDITIONS]->name);
STRCMP_EQUAL("test3.content", new_item->options[GUI_BAR_ITEM_CUSTOM_OPTION_CONTENT]->name);
gui_bar_item_custom_free (new_item);
gui_bar_item_custom_free (new_item2);
}