refactor: resize Progress autocmd dict to actual size #38487

Problem:
  The temp_dict in `do_autocmd_progress()` is sized 7, but the max is 6 (id, text, percent, status, title, data). The extra capacity is rather misleading.

Solution:
  make the size of the dict 6.
This commit is contained in:
Willaaaaaaa
2026-03-26 05:00:46 +08:00
committed by GitHub
parent ea878f456a
commit c9e961994b

View File

@@ -1135,7 +1135,7 @@ void do_autocmd_progress(MsgID msg_id, HlMessage msg, MessageData *msg_data)
return;
}
MAXSIZE_TEMP_DICT(data, 7);
MAXSIZE_TEMP_DICT(data, 6);
ArrayOf(String) messages = ARRAY_DICT_INIT;
for (size_t i = 0; i < msg.size; i++) {
ADD(messages, STRING_OBJ(msg.items[i].text));