Karsten Hopp 4fd8e1
To: vim_dev@googlegroups.com
Karsten Hopp 4fd8e1
Subject: Patch 7.3.606
Karsten Hopp 4fd8e1
Fcc: outbox
Karsten Hopp 4fd8e1
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 4fd8e1
Mime-Version: 1.0
Karsten Hopp 4fd8e1
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 4fd8e1
Content-Transfer-Encoding: 8bit
Karsten Hopp 4fd8e1
------------
Karsten Hopp 4fd8e1
Karsten Hopp 4fd8e1
Patch 7.3.606
Karsten Hopp 4fd8e1
Problem:    CTRL-P completion has a problem with multi-byte characters.
Karsten Hopp 4fd8e1
Solution:   Check for next character being NUL properly.  (Yasuhiro Matsumoto)
Karsten Hopp 4fd8e1
Files:	    src/search.c, src/macros.h
Karsten Hopp 4fd8e1
Karsten Hopp 4fd8e1
Karsten Hopp 4fd8e1
*** ../vim-7.3.605/src/search.c	2012-06-06 16:12:54.000000000 +0200
Karsten Hopp 4fd8e1
--- src/search.c	2012-07-19 17:09:20.000000000 +0200
Karsten Hopp 4fd8e1
***************
Karsten Hopp 4fd8e1
*** 5141,5147 ****
Karsten Hopp 4fd8e1
  		    && !(compl_cont_status & CONT_SOL)
Karsten Hopp 4fd8e1
  #endif
Karsten Hopp 4fd8e1
  		    && *startp != NUL
Karsten Hopp 4fd8e1
! 		    && *(p = startp + 1) != NUL)
Karsten Hopp 4fd8e1
  		goto search_line;
Karsten Hopp 4fd8e1
  	}
Karsten Hopp 4fd8e1
  	line_breakcheck();
Karsten Hopp 4fd8e1
--- 5141,5147 ----
Karsten Hopp 4fd8e1
  		    && !(compl_cont_status & CONT_SOL)
Karsten Hopp 4fd8e1
  #endif
Karsten Hopp 4fd8e1
  		    && *startp != NUL
Karsten Hopp 4fd8e1
! 		    && *(p = startp + MB_PTR2LEN(startp)) != NUL)
Karsten Hopp 4fd8e1
  		goto search_line;
Karsten Hopp 4fd8e1
  	}
Karsten Hopp 4fd8e1
  	line_breakcheck();
Karsten Hopp 4fd8e1
*** ../vim-7.3.605/src/macros.h	2010-09-21 16:56:29.000000000 +0200
Karsten Hopp 4fd8e1
--- src/macros.h	2012-07-19 17:08:38.000000000 +0200
Karsten Hopp 4fd8e1
***************
Karsten Hopp 4fd8e1
*** 259,264 ****
Karsten Hopp 4fd8e1
--- 259,266 ----
Karsten Hopp 4fd8e1
   * PTR2CHAR(): get character from pointer.
Karsten Hopp 4fd8e1
   */
Karsten Hopp 4fd8e1
  #ifdef FEAT_MBYTE
Karsten Hopp 4fd8e1
+ /* Get the length of the character p points to */
Karsten Hopp 4fd8e1
+ # define MB_PTR2LEN(p)		(has_mbyte ? (*mb_ptr2len)(p) : 1)
Karsten Hopp 4fd8e1
  /* Advance multi-byte pointer, skip over composing chars. */
Karsten Hopp 4fd8e1
  # define mb_ptr_adv(p)	    p += has_mbyte ? (*mb_ptr2len)(p) : 1
Karsten Hopp 4fd8e1
  /* Advance multi-byte pointer, do not skip over composing chars. */
Karsten Hopp 4fd8e1
***************
Karsten Hopp 4fd8e1
*** 272,277 ****
Karsten Hopp 4fd8e1
--- 274,280 ----
Karsten Hopp 4fd8e1
  # define MB_CHARLEN(p)	    (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
Karsten Hopp 4fd8e1
  # define PTR2CHAR(p)	    (has_mbyte ? mb_ptr2char(p) : (int)*(p))
Karsten Hopp 4fd8e1
  #else
Karsten Hopp 4fd8e1
+ # define MB_PTR2LEN(p)		1
Karsten Hopp 4fd8e1
  # define mb_ptr_adv(p)		++p
Karsten Hopp 4fd8e1
  # define mb_cptr_adv(p)		++p
Karsten Hopp 4fd8e1
  # define mb_ptr_back(s, p)	--p
Karsten Hopp 4fd8e1
*** ../vim-7.3.605/src/version.c	2012-07-19 11:37:22.000000000 +0200
Karsten Hopp 4fd8e1
--- src/version.c	2012-07-19 17:13:53.000000000 +0200
Karsten Hopp 4fd8e1
***************
Karsten Hopp 4fd8e1
*** 716,717 ****
Karsten Hopp 4fd8e1
--- 716,719 ----
Karsten Hopp 4fd8e1
  {   /* Add new patch number below this line */
Karsten Hopp 4fd8e1
+ /**/
Karsten Hopp 4fd8e1
+     606,
Karsten Hopp 4fd8e1
  /**/
Karsten Hopp 4fd8e1
Karsten Hopp 4fd8e1
-- 
Karsten Hopp 4fd8e1
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 4fd8e1
151. You find yourself engaged to someone you've never actually met,
Karsten Hopp 4fd8e1
     except through e-mail.
Karsten Hopp 4fd8e1
Karsten Hopp 4fd8e1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 4fd8e1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 4fd8e1
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 4fd8e1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///