Mercurial > vim
comparison src/search.c @ 13225:1961162121c7 v8.0.1487
patch 8.0.1487: test 14 fails
commit https://github.com/vim/vim/commit/8846ac5aedb568b9aae969f0ad2b9b1606522ca9
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 9 19:24:01 2018 +0100
patch 8.0.1487: test 14 fails
Problem: Test 14 fails.
Solution: Fix of-by-one error.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 09 Feb 2018 19:30:06 +0100 |
parents | e37327129859 |
children | ac42c4b11dbc |
comparison
equal
deleted
inserted
replaced
13224:38cd45e2c97b | 13225:1961162121c7 |
---|---|
683 else if (has_mbyte | 683 else if (has_mbyte |
684 && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count | 684 && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count |
685 && pos->col < MAXCOL - 2) | 685 && pos->col < MAXCOL - 2) |
686 { | 686 { |
687 ptr = ml_get_buf(buf, pos->lnum, FALSE); | 687 ptr = ml_get_buf(buf, pos->lnum, FALSE); |
688 if ((int)STRLEN(ptr) < pos->col) | 688 if ((int)STRLEN(ptr) <= pos->col) |
689 start_char_len = 1; | 689 start_char_len = 1; |
690 else | 690 else |
691 start_char_len = (*mb_ptr2len)(ptr + pos->col); | 691 start_char_len = (*mb_ptr2len)(ptr + pos->col); |
692 } | 692 } |
693 #endif | 693 #endif |