refactor(api): use an arena for nvim_buf_get_lines and buffer updates

Refactor some earlier "temporary Array" code in buffer_updates.c to use
the modern style of MAXSIZE_TEMP_ARRAY and ADD_C
This commit is contained in:
bfredl
2024-02-10 13:13:52 +01:00
parent ca258db156
commit 930d6e38d4
6 changed files with 81 additions and 117 deletions

View File

@@ -1672,10 +1672,7 @@ Dictionary ns_get_hl_defs(NS ns_id, Dict(get_highlight) *opts, Arena *arena, Err
return rv;
cleanup:
api_free_integer(id);
api_free_boolean(link);
Dictionary empty = ARRAY_DICT_INIT;
return empty;
return (Dictionary)ARRAY_DICT_INIT;
}
/// Outputs a highlight when doing ":hi MyHighlight"