]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.192 v7.3.192
authorBram Moolenaar <Bram@vim.org>
Thu, 19 May 2011 12:30:16 +0000 (14:30 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 19 May 2011 12:30:16 +0000 (14:30 +0200)
Problem:    Ex command ":s/ \?/ /g" splits multi-byte characters into bytes.
            (Dominique Pelle)
Solution:   Advance over whole character instead of one byte.

src/ex_cmds.c
src/version.c

index 9d2bdc7989936ca52b5dff60a1a77dac20894afe..64c1371bd36669fb23c38b0304621fc222c4357c 100644 (file)
@@ -4625,7 +4625,15 @@ do_sub(eap)
                         * for a match in this line again. */
                        skip_match = TRUE;
                    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;
                }
 
index a14c43de6ac55794a16a38becf2920e429179761..94f1a95d6f58f2228cdf74c14ef48ad9a8e0a1ce 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    192,
 /**/
     191,
 /**/