From f528aeff6edc7a0a3d841050ca74603720313bcb Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 20 Aug 2018 00:07:56 -0400 Subject: vim-patch:8.0.1487: test 14 fails Problem: Test 14 fails. Solution: Fix of-by-one error. https://github.com/vim/vim/commit/8846ac5aedb568b9aae969f0ad2b9b1606522ca9 --- src/nvim/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit