]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.019 v7.4.019
authorBram Moolenaar <Bram@vim.org>
Thu, 5 Sep 2013 11:50:53 +0000 (13:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 Sep 2013 11:50:53 +0000 (13:50 +0200)
Problem:    MS-Windows: File name completion doesn't work properly with
            Chinese characters. (Yue Wu)
Solution:   Take care of multi-byte characters when looking for the start of
            the file name. (Ken Takata)

src/edit.c
src/version.c

index 6f8dc49a3ddad486dd2be2e4e6bd9f86b2e3dde9..0c6089b683fa8f64c423925d9837af275ee3afed 100644 (file)
@@ -5183,8 +5183,14 @@ ins_complete(c)
        }
        else if (ctrl_x_mode == CTRL_X_FILES)
        {
-           while (--startcol >= 0 && vim_isfilec(line[startcol]))
-               ;
+           char_u      *p = line + startcol;
+
+           /* Go back to just before the first filename character. */
+           mb_ptr_back(line, p);
+           while (vim_isfilec(PTR2CHAR(p)) && p >= line)
+               mb_ptr_back(line, p);
+           startcol = p - line;
+
            compl_col += ++startcol;
            compl_length = (int)curs_col - startcol;
            compl_pattern = addstar(line + compl_col, compl_length,
index abed945407ff825cb5b647cae10ff27a6a2ad2bf..0e6dc1c8072a9d0dc9478ed2fb77642a7f42a7a5 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    19,
 /**/
     18,
 /**/