aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 448ade5e4b..8f5718d97e 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -1207,7 +1207,7 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer id,
api_set_error(err, kErrorTypeValidation, "line value outside range");
return 0;
} else if (line < buf->b_ml.ml_line_count) {
- len = STRLEN(ml_get_buf(curbuf, (linenr_T)line+1, false));
+ len = STRLEN(ml_get_buf(buf, (linenr_T)line+1, false));
}
if (col == -1) {