0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.3.192

Problem:    Ex command ":s/ \?/ /g" splits multi-byte characters into bytes.
            (Dominique Pelle)
Solution:   Advance over whole character instead of one byte.
This commit is contained in:
Bram Moolenaar
2011-05-19 14:30:16 +02:00
parent 2d5204ff88
commit 0df1102698
2 changed files with 11 additions and 1 deletions

View File

@@ -4625,7 +4625,15 @@ do_sub(eap)
* for a match in this line again. */ * for a match in this line again. */
skip_match = TRUE; skip_match = TRUE;
else else
++matchcol; /* search for a match at next column */ {
/* search for a match at next column */
#ifdef FEAT_MBYTE
if (has_mbyte)
matchcol += mb_ptr2len(sub_firstline + matchcol);
else
#endif
++matchcol;
}
goto skip; goto skip;
} }

View File

@@ -709,6 +709,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
192,
/**/ /**/
191, 191,
/**/ /**/