aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 4150d0997d..f032604a59 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -957,7 +957,7 @@ retry:
int tlen = 0;
while (true) {
p = (uint8_t *)ml_get(read_buf_lnum) + read_buf_col;
- int n = (int)strlen((char *)p);
+ int n = ml_get_len(read_buf_lnum) - read_buf_col;
if (tlen + n + 1 > size) {
// Filled up to "size", append partial line.
// Change NL to NUL to reverse the effect done