mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
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:
@@ -656,10 +656,10 @@ void nvim_set_current_dir(String dir, Error *err)
|
||||
///
|
||||
/// @param[out] err Error details, if any
|
||||
/// @return Current line string
|
||||
String nvim_get_current_line(Error *err)
|
||||
String nvim_get_current_line(Arena *arena, Error *err)
|
||||
FUNC_API_SINCE(1)
|
||||
{
|
||||
return buffer_get_line(curbuf->handle, curwin->w_cursor.lnum - 1, err);
|
||||
return buffer_get_line(curbuf->handle, curwin->w_cursor.lnum - 1, arena, err);
|
||||
}
|
||||
|
||||
/// Sets the current line.
|
||||
|
Reference in New Issue
Block a user