comparison src/edit.c @ 5332:d5eb32dc231c v7.4.019

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)
author Bram Moolenaar <bram@vim.org>
date Thu, 05 Sep 2013 13:50:53 +0200
parents 460d5be9395e
children 09361f13580b
comparison
equal deleted inserted replaced
5331:2034e92cd480 5332:d5eb32dc231c
5181 if (compl_pattern == NULL) 5181 if (compl_pattern == NULL)
5182 return FAIL; 5182 return FAIL;
5183 } 5183 }
5184 else if (ctrl_x_mode == CTRL_X_FILES) 5184 else if (ctrl_x_mode == CTRL_X_FILES)
5185 { 5185 {
5186 while (--startcol >= 0 && vim_isfilec(line[startcol])) 5186 char_u *p = line + startcol;
5187 ; 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
5188 compl_col += ++startcol; 5194 compl_col += ++startcol;
5189 compl_length = (int)curs_col - startcol; 5195 compl_length = (int)curs_col - startcol;
5190 compl_pattern = addstar(line + compl_col, compl_length, 5196 compl_pattern = addstar(line + compl_col, compl_length,
5191 EXPAND_FILES); 5197 EXPAND_FILES);
5192 if (compl_pattern == NULL) 5198 if (compl_pattern == NULL)