Skip to content

Commit 8e2a162

Browse files
committed
updated for version 7.4.019
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)
1 parent 9297019 commit 8e2a162

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/edit.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5183,8 +5183,14 @@ ins_complete(c)
51835183
}
51845184
else if (ctrl_x_mode == CTRL_X_FILES)
51855185
{
5186-
while (--startcol >= 0 && vim_isfilec(line[startcol]))
5187-
;
5186+
char_u *p = line + startcol;
5187+
5188+
/* Go back to just before the first filename character. */
5189+
mb_ptr_back(line, p);
5190+
while (vim_isfilec(PTR2CHAR(p)) && p >= line)
5191+
mb_ptr_back(line, p);
5192+
startcol = p - line;
5193+
51885194
compl_col += ++startcol;
51895195
compl_length = (int)curs_col - startcol;
51905196
compl_pattern = addstar(line + compl_col, compl_length,

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
19,
741743
/**/
742744
18,
743745
/**/

0 commit comments

Comments
 (0)