Blame SOURCES/7.4.589

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.589
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.589
22c937
Problem:    In the MS-Windows console Vim can't handle greek characters when
22c937
	    encoding is utf-8.
22c937
Solution:   Escape K_NUL. (Yasuhiro Matsumoto)
22c937
Files:	    src/os_win32.c
22c937
22c937
22c937
*** ../vim-7.4.588/src/os_win32.c	2014-11-12 16:10:44.254085193 +0100
22c937
--- src/os_win32.c	2015-01-20 19:36:59.725188180 +0100
22c937
***************
22c937
*** 1814,1831 ****
22c937
  		if (conv)
22c937
  		{
22c937
  		    char_u *p = typeahead + typeaheadlen;
22c937
- 		    char_u *e = typeahead + TYPEAHEADLEN;
22c937
  
22c937
! 		    while (*p && p < e)
22c937
  		    {
22c937
! 			if (*p == K_NUL)
22c937
  			{
22c937
  			    ++p;
22c937
- 			    mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
22c937
- 			    *p = 3;
22c937
- 			    ++n;
22c937
  			}
22c937
- 			++p;
22c937
  		    }
22c937
  		}
22c937
  
22c937
--- 1814,1835 ----
22c937
  		if (conv)
22c937
  		{
22c937
  		    char_u *p = typeahead + typeaheadlen;
22c937
  
22c937
! 		    if (*p != K_NUL)
22c937
  		    {
22c937
! 			char_u *e = typeahead + TYPEAHEADLEN;
22c937
! 
22c937
! 			while (*p && p < e)
22c937
  			{
22c937
+ 			    if (*p == K_NUL)
22c937
+ 			    {
22c937
+ 				++p;
22c937
+ 				mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
22c937
+ 				*p = 3;
22c937
+ 				++n;
22c937
+ 			    }
22c937
  			    ++p;
22c937
  			}
22c937
  		    }
22c937
  		}
22c937
  
22c937
*** ../vim-7.4.588/src/version.c	2015-01-20 19:30:46.669275579 +0100
22c937
--- src/version.c	2015-01-20 19:35:35.774107846 +0100
22c937
***************
22c937
*** 743,744 ****
22c937
--- 743,746 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     589,
22c937
  /**/
22c937
22c937
-- 
22c937
hundred-and-one symptoms of being an internet addict:
22c937
95. Only communication in your household is through email.
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    ///