mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
vim-patch:8.0.1487: test 14 fails
Problem: Test 14 fails.
Solution: Fix of-by-one error.
8846ac5aed
This commit is contained in:
@@ -571,7 +571,7 @@ int searchit(
|
|||||||
&& pos->col < MAXCOL - 2) {
|
&& pos->col < MAXCOL - 2) {
|
||||||
// Watch out for the "col" being MAXCOL - 2, used in a closed fold.
|
// Watch out for the "col" being MAXCOL - 2, used in a closed fold.
|
||||||
ptr = ml_get_buf(buf, pos->lnum, false);
|
ptr = ml_get_buf(buf, pos->lnum, false);
|
||||||
if ((int)STRLEN(ptr) < pos->col) {
|
if ((int)STRLEN(ptr) <= pos->col) {
|
||||||
start_char_len = 1;
|
start_char_len = 1;
|
||||||
} else {
|
} else {
|
||||||
start_char_len = utfc_ptr2len(ptr + pos->col);
|
start_char_len = utfc_ptr2len(ptr + pos->col);
|
||||||
|
Reference in New Issue
Block a user