fixup! refactor nvim_buf_set_lines to use extmark_splice

This commit is contained in:
Jan Edmund Lazo 2021-05-10 23:00:00 -04:00
parent 61aefaf299
commit 89e29e8774
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -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]);