mirror of
https://github.com/neovim/neovim.git
synced 2026-03-27 19:02:02 +00:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user