1
0
forked from aniani/vim

updated for version 7.3.779

Problem:    Backwards search lands in wrong place when started on a multibyte
            character.
Solution:   Do not set extra_col for a backwards search. (Sung Pae)
This commit is contained in:
Bram Moolenaar
2013-01-23 16:43:11 +01:00
parent 94a8adfdd8
commit 55b7b7eeb5
4 changed files with 9 additions and 1 deletions

View File

@@ -572,7 +572,8 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
extra_col = 0;
#ifdef FEAT_MBYTE
/* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */
else if (has_mbyte && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count
else if (dir != BACKWARD && has_mbyte
&& pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count
&& pos->col < MAXCOL - 2)
{
ptr = ml_get_buf(buf, pos->lnum, FALSE) + pos->col;