aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 2ecc8da09e..dac88941dd 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -571,7 +571,7 @@ int searchit(
&& pos->col < MAXCOL - 2) {
// Watch out for the "col" being MAXCOL - 2, used in a closed fold.
ptr = ml_get_buf(buf, pos->lnum, false);
- if ((int)STRLEN(ptr) < pos->col) {
+ if ((int)STRLEN(ptr) <= pos->col) {
start_char_len = 1;
} else {
start_char_len = utfc_ptr2len(ptr + pos->col);