aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index 0ecdd88ebd..1273093d8b 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -1715,7 +1715,7 @@ void mark_mb_adjustpos(buf_T *buf, pos_T *lp)
{
if (lp->col > 0 || lp->coladd > 1) {
const char *const p = ml_get_buf(buf, lp->lnum);
- if (*p == NUL || (int)strlen(p) < lp->col) {
+ if (*p == NUL || ml_get_buf_len(buf, lp->lnum) < lp->col) {
lp->col = 0;
} else {
lp->col -= utf_head_off(p, p + lp->col);