Blame SOURCES/7.4.019

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