commit | 8846ac5aedb568b9aae969f0ad2b9b1606522ca9 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Fri Feb 09 19:24:01 2018 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Fri Feb 09 19:24:01 2018 +0100 |
tree | 954a97afa9b9c3550c64272814cd042e0311f38b | |
parent | 82846a00ac0c135946c93c48c1657018a5c96b11 [diff] [blame] |
patch 8.0.1487: test 14 fails Problem: Test 14 fails. Solution: Fix of-by-one error.
diff --git a/src/search.c b/src/search.c index 8089dcf..7f019ed 100644 --- a/src/search.c +++ b/src/search.c
@@ -685,7 +685,7 @@ && pos->col < MAXCOL - 2) { 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 = (*mb_ptr2len)(ptr + pos->col);