Blame SOURCES/7.4.019

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