From fa7e1e26019112ff9e2ea42626995f04e2a4e032 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 15 Nov 2022 21:27:42 +0000 Subject: fix(api): nvim_buf_get_text regression (#21071) --- src/nvim/buffer_updates.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/buffer_updates.c') diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c index bee7db1e98..2c92fb26b2 100644 --- a/src/nvim/buffer_updates.c +++ b/src/nvim/buffer_updates.c @@ -81,7 +81,7 @@ bool buf_updates_register(buf_T *buf, uint64_t channel_id, BufUpdateCallbacks cb linedata.size = line_count; linedata.items = xcalloc(line_count, sizeof(Object)); - buf_collect_lines(buf, line_count, 1, true, &linedata, NULL, NULL); + buf_collect_lines(buf, line_count, 1, 0, true, &linedata, NULL, NULL); } args.items[4] = ARRAY_OBJ(linedata); @@ -242,7 +242,7 @@ void buf_updates_send_changes(buf_T *buf, linenr_T firstline, int64_t num_added, STATIC_ASSERT(SIZE_MAX >= MAXLNUM, "size_t smaller than MAXLNUM"); linedata.size = (size_t)num_added; linedata.items = xcalloc((size_t)num_added, sizeof(Object)); - buf_collect_lines(buf, (size_t)num_added, firstline, true, &linedata, + buf_collect_lines(buf, (size_t)num_added, firstline, 0, true, &linedata, NULL, NULL); } args.items[4] = ARRAY_OBJ(linedata); -- cgit