diff options
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r-- | src/nvim/api/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index a396693a61..665c622c98 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -442,7 +442,7 @@ void nvim_buf_set_lines(uint64_t channel_id, goto end; } - bcount_t deleted_bytes = MAX(get_region_bytecount(start, end, 0, 0)-1, 0); + bcount_t deleted_bytes = get_region_bytecount(curbuf, start, end, 0, 0); // If the size of the range is reducing (ie, new_len < old_len) we // need to delete some old_len. We do this at the start, by |