1fa1ff
To: vim_dev@googlegroups.com
1fa1ff
Subject: Patch 7.4.019
1fa1ff
Fcc: outbox
1fa1ff
From: Bram Moolenaar <Bram@moolenaar.net>
1fa1ff
Mime-Version: 1.0
1fa1ff
Content-Type: text/plain; charset=UTF-8
1fa1ff
Content-Transfer-Encoding: 8bit
1fa1ff
------------
1fa1ff
1fa1ff
Patch 7.4.019
1fa1ff
Problem:    MS-Windows: File name completion doesn't work properly with
1fa1ff
	    Chinese characters. (Yue Wu)
1fa1ff
Solution:   Take care of multi-byte characters when looking for the start of
1fa1ff
	    the file name. (Ken Takata)
1fa1ff
Files:	    src/edit.c
1fa1ff
1fa1ff
1fa1ff
*** ../vim-7.4.018/src/edit.c	2013-09-05 12:49:48.000000000 +0200
1fa1ff
--- src/edit.c	2013-09-05 13:45:27.000000000 +0200
1fa1ff
***************
1fa1ff
*** 5183,5190 ****
1fa1ff
  	}
1fa1ff
  	else if (ctrl_x_mode == CTRL_X_FILES)
1fa1ff
  	{
1fa1ff
! 	    while (--startcol >= 0 && vim_isfilec(line[startcol]))
1fa1ff
! 		;
1fa1ff
  	    compl_col += ++startcol;
1fa1ff
  	    compl_length = (int)curs_col - startcol;
1fa1ff
  	    compl_pattern = addstar(line + compl_col, compl_length,
1fa1ff
--- 5183,5196 ----
1fa1ff
  	}
1fa1ff
  	else if (ctrl_x_mode == CTRL_X_FILES)
1fa1ff
  	{
1fa1ff
! 	    char_u	*p = line + startcol;
1fa1ff
! 
1fa1ff
! 	    /* Go back to just before the first filename character. */
1fa1ff
! 	    mb_ptr_back(line, p);
1fa1ff
! 	    while (vim_isfilec(PTR2CHAR(p)) && p >= line)
1fa1ff
! 		mb_ptr_back(line, p);
1fa1ff
! 	    startcol = p - line;
1fa1ff
! 
1fa1ff
  	    compl_col += ++startcol;
1fa1ff
  	    compl_length = (int)curs_col - startcol;
1fa1ff
  	    compl_pattern = addstar(line + compl_col, compl_length,
1fa1ff
*** ../vim-7.4.018/src/version.c	2013-09-05 12:49:48.000000000 +0200
1fa1ff
--- src/version.c	2013-09-05 13:41:47.000000000 +0200
1fa1ff
***************
1fa1ff
*** 740,741 ****
1fa1ff
--- 740,743 ----
1fa1ff
  {   /* Add new patch number below this line */
1fa1ff
+ /**/
1fa1ff
+     19,
1fa1ff
  /**/
1fa1ff
1fa1ff
-- 
1fa1ff
        Very funny, Scotty.  Now beam down my clothes.
1fa1ff
1fa1ff
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
1fa1ff
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1fa1ff
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
1fa1ff
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///