Skip to content

Commit

Permalink
updated for version 7.4.019
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
brammool committed Sep 5, 2013
1 parent 9297019 commit 8e2a162
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
19,
/**/
18,
/**/
Expand Down

0 comments on commit 8e2a162

Please sign in to comment.