From 89e29e8774ed953048ab746d4a83a6f08d850d17 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 10 May 2021 23:00:00 -0400 Subject: fixup! refactor nvim_buf_set_lines to use extmark_splice --- src/nvim/api/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/api/buffer.c') diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index ebc9aeb75f..11a4647d1c 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -477,7 +477,7 @@ void nvim_buf_set_lines(uint64_t channel_id, goto end; } - inserted_bytes += STRLEN(lines[i]) + 1; + inserted_bytes += (bcount_t)strlen(lines[i]) + 1; // Mark lines that haven't been passed to the buffer as they need // to be freed later lines[i] = NULL; @@ -497,7 +497,7 @@ void nvim_buf_set_lines(uint64_t channel_id, goto end; } - inserted_bytes += STRLEN(lines[i]) + 1; + inserted_bytes += (bcount_t)strlen(lines[i]) + 1; // Same as with replacing, but we also need to free lines xfree(lines[i]); -- cgit