summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c
index 41f38a3d1..a063a26be 100644
--- a/src/search.c
+++ b/src/search.c
@@ -809,6 +809,13 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum)
{
pos->lnum = lnum + endpos.lnum;
pos->col = endpos.col - 1;
+#ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ ptr = ml_get_buf(buf, pos->lnum, FALSE);
+ pos->col -= (*mb_head_off)(ptr, ptr + pos->col);
+ }
+#endif
}
else
{