jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.363

3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.363
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.363
3ef2ca
Problem:    In Windows console typing 0xCE does not work.
3ef2ca
Solution:   Convert 0xCE to K_NUL 3. (Nobuhiro Takasaki et al.)
3ef2ca
Files:	    src/os_win32.c, src/term.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.362/src/os_win32.c	2014-04-01 21:00:45.436733663 +0200
3ef2ca
--- src/os_win32.c	2014-07-09 20:29:30.787609327 +0200
3ef2ca
***************
3ef2ca
*** 619,625 ****
3ef2ca
  	return FALSE;
3ef2ca
      }
3ef2ca
  
3ef2ca
!     tokenPrivileges.PrivilegeCount           = 1;
3ef2ca
      tokenPrivileges.Privileges[0].Luid       = luid;
3ef2ca
      tokenPrivileges.Privileges[0].Attributes = bEnable ?
3ef2ca
  						    SE_PRIVILEGE_ENABLED : 0;
3ef2ca
--- 619,625 ----
3ef2ca
  	return FALSE;
3ef2ca
      }
3ef2ca
  
3ef2ca
!     tokenPrivileges.PrivilegeCount	     = 1;
3ef2ca
      tokenPrivileges.Privileges[0].Luid       = luid;
3ef2ca
      tokenPrivileges.Privileges[0].Attributes = bEnable ?
3ef2ca
  						    SE_PRIVILEGE_ENABLED : 0;
3ef2ca
***************
3ef2ca
*** 1785,1797 ****
3ef2ca
  #endif
3ef2ca
  	    {
3ef2ca
  		int	n = 1;
3ef2ca
  
3ef2ca
- 		/* A key may have one or two bytes. */
3ef2ca
  		typeahead[typeaheadlen] = c;
3ef2ca
  		if (ch2 != NUL)
3ef2ca
  		{
3ef2ca
! 		    typeahead[typeaheadlen + 1] = ch2;
3ef2ca
! 		    ++n;
3ef2ca
  		}
3ef2ca
  #ifdef FEAT_MBYTE
3ef2ca
  		/* Only convert normal characters, not special keys.  Need to
3ef2ca
--- 1785,1798 ----
3ef2ca
  #endif
3ef2ca
  	    {
3ef2ca
  		int	n = 1;
3ef2ca
+ 		int     conv = FALSE;
3ef2ca
  
3ef2ca
  		typeahead[typeaheadlen] = c;
3ef2ca
  		if (ch2 != NUL)
3ef2ca
  		{
3ef2ca
! 		    typeahead[typeaheadlen + 1] = 3;
3ef2ca
! 		    typeahead[typeaheadlen + 2] = ch2;
3ef2ca
! 		    n += 2;
3ef2ca
  		}
3ef2ca
  #ifdef FEAT_MBYTE
3ef2ca
  		/* Only convert normal characters, not special keys.  Need to
3ef2ca
***************
3ef2ca
*** 1800,1805 ****
3ef2ca
--- 1801,1807 ----
3ef2ca
  		if (input_conv.vc_type != CONV_NONE
3ef2ca
  						&& (ch2 == NUL || c != K_NUL))
3ef2ca
  		{
3ef2ca
+ 		    conv = TRUE;
3ef2ca
  		    typeaheadlen -= unconverted;
3ef2ca
  		    n = convert_input_safe(typeahead + typeaheadlen,
3ef2ca
  				n + unconverted, TYPEAHEADLEN - typeaheadlen,
3ef2ca
***************
3ef2ca
*** 1807,1812 ****
3ef2ca
--- 1809,1832 ----
3ef2ca
  		}
3ef2ca
  #endif
3ef2ca
  
3ef2ca
+ 		if (conv)
3ef2ca
+ 		{
3ef2ca
+ 		    char_u *p = typeahead + typeaheadlen;
3ef2ca
+ 		    char_u *e = typeahead + TYPEAHEADLEN;
3ef2ca
+ 
3ef2ca
+ 		    while (*p && p < e)
3ef2ca
+ 		    {
3ef2ca
+ 			if (*p == K_NUL)
3ef2ca
+ 			{
3ef2ca
+ 			    ++p;
3ef2ca
+ 			    mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
3ef2ca
+ 			    *p = 3;
3ef2ca
+ 			    ++n;
3ef2ca
+ 			}
3ef2ca
+ 			++p;
3ef2ca
+ 		    }
3ef2ca
+ 		}
3ef2ca
+ 
3ef2ca
  		/* Use the ALT key to set the 8th bit of the character
3ef2ca
  		 * when it's one byte, the 8th bit isn't set yet and not
3ef2ca
  		 * using a double-byte encoding (would become a lead
3ef2ca
*** ../vim-7.4.362/src/term.c	2014-07-09 19:13:45.003701718 +0200
3ef2ca
--- src/term.c	2014-07-09 20:26:28.655613029 +0200
3ef2ca
***************
3ef2ca
*** 3724,3730 ****
3ef2ca
--- 3724,3734 ----
3ef2ca
  	return;
3ef2ca
      }
3ef2ca
  
3ef2ca
+ #if defined(WIN3264) && !defined(FEAT_GUI)
3ef2ca
+     s = vim_strnsave(string, (int)STRLEN(string) + 1);
3ef2ca
+ #else
3ef2ca
      s = vim_strsave(string);
3ef2ca
+ #endif
3ef2ca
      if (s == NULL)
3ef2ca
  	return;
3ef2ca
  
3ef2ca
***************
3ef2ca
*** 3734,3739 ****
3ef2ca
--- 3738,3752 ----
3ef2ca
  	STRMOVE(s, s + 1);
3ef2ca
  	s[0] = term_7to8bit(string);
3ef2ca
      }
3ef2ca
+ 
3ef2ca
+ #if defined(WIN3264) && !defined(FEAT_GUI)
3ef2ca
+     if (s[0] == K_NUL)
3ef2ca
+     {
3ef2ca
+         STRMOVE(s + 1, s);
3ef2ca
+         s[1] = 3;
3ef2ca
+     }
3ef2ca
+ #endif
3ef2ca
+ 
3ef2ca
      len = (int)STRLEN(s);
3ef2ca
  
3ef2ca
      need_gather = TRUE;		/* need to fill termleader[] */
3ef2ca
*** ../vim-7.4.362/src/version.c	2014-07-09 20:20:40.359620108 +0200
3ef2ca
--- src/version.c	2014-07-09 20:26:38.903612821 +0200
3ef2ca
***************
3ef2ca
*** 736,737 ****
3ef2ca
--- 736,739 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     363,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
3ef2ca
ANOTHER MONK:    And St.  Attila raised his hand grenade up on high saying "O
3ef2ca
                 Lord bless this thy hand grenade that with it thou mayest
3ef2ca
                 blow thine enemies to tiny bits, in thy mercy. "and the Lord
3ef2ca
                 did grin and people did feast upon the lambs and sloths and
3ef2ca
                 carp and anchovies and orang-utans and breakfast cereals and
3ef2ca
                 fruit bats and...
3ef2ca
BROTHER MAYNARD: Skip a bit brother ...
3ef2ca
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///