From e5c22f6347771ed2f303a6f29811201234a34b6a Mon Sep 17 00:00:00 2001 From: disrupted Date: Mon, 10 May 2021 13:31:06 +0200 Subject: Fix nvim_buf_set_lines --- src/nvim/api/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/api/buffer.c') diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index 665c622c98..ebc9aeb75f 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -516,7 +516,7 @@ void nvim_buf_set_lines(uint64_t channel_id, kExtmarkNOOP); extmark_splice(curbuf, (int)start-1, 0, (int)(end-start), 0, - deleted_bytes, (int)(end+extra-1), 0, inserted_bytes, + deleted_bytes, (int)new_len, 0, inserted_bytes, kExtmarkUndo); changed_lines((linenr_T)start, 0, (linenr_T)end, (long)extra, true); -- cgit