diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-02-10 13:13:52 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-02-11 11:37:55 +0100 |
commit | 930d6e38d4eb61adbb4f0d7328f55b31408b7cd1 (patch) | |
tree | 3467ab61eded7dc613ee9ba7b83198088e659870 /src/nvim/api/vim.c | |
parent | ca258db15668242c50a0529111398f53e4e01619 (diff) | |
download | rneovim-930d6e38d4eb61adbb4f0d7328f55b31408b7cd1.tar.gz rneovim-930d6e38d4eb61adbb4f0d7328f55b31408b7cd1.tar.bz2 rneovim-930d6e38d4eb61adbb4f0d7328f55b31408b7cd1.zip |
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
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index a47694a0cf..78c2561bbd 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -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. |