vim-patch:8.0.1487: test 14 fails

Problem:    Test 14 fails.
Solution:   Fix of-by-one error.
8846ac5aed
This commit is contained in:
Jan Edmund Lazo 2018-08-20 00:07:56 -04:00
parent 1d2b702008
commit f528aeff6e

View File

@ -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);