home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.363 < prev    next >
Encoding:
Internet Message Format  |  2014-07-08  |  4.3 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.363
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.363
  11. Problem:    In Windows console typing 0xCE does not work.
  12. Solution:   Convert 0xCE to K_NUL 3. (Nobuhiro Takasaki et al.)
  13. Files:        src/os_win32.c, src/term.c
  14.  
  15.  
  16. *** ../vim-7.4.362/src/os_win32.c    2014-04-01 21:00:45.436733663 +0200
  17. --- src/os_win32.c    2014-07-09 20:29:30.787609327 +0200
  18. ***************
  19. *** 619,625 ****
  20.       return FALSE;
  21.       }
  22.   
  23. !     tokenPrivileges.PrivilegeCount           = 1;
  24.       tokenPrivileges.Privileges[0].Luid       = luid;
  25.       tokenPrivileges.Privileges[0].Attributes = bEnable ?
  26.                               SE_PRIVILEGE_ENABLED : 0;
  27. --- 619,625 ----
  28.       return FALSE;
  29.       }
  30.   
  31. !     tokenPrivileges.PrivilegeCount         = 1;
  32.       tokenPrivileges.Privileges[0].Luid       = luid;
  33.       tokenPrivileges.Privileges[0].Attributes = bEnable ?
  34.                               SE_PRIVILEGE_ENABLED : 0;
  35. ***************
  36. *** 1785,1797 ****
  37.   #endif
  38.           {
  39.           int    n = 1;
  40.   
  41. -         /* A key may have one or two bytes. */
  42.           typeahead[typeaheadlen] = c;
  43.           if (ch2 != NUL)
  44.           {
  45. !             typeahead[typeaheadlen + 1] = ch2;
  46. !             ++n;
  47.           }
  48.   #ifdef FEAT_MBYTE
  49.           /* Only convert normal characters, not special keys.  Need to
  50. --- 1785,1798 ----
  51.   #endif
  52.           {
  53.           int    n = 1;
  54. +         int     conv = FALSE;
  55.   
  56.           typeahead[typeaheadlen] = c;
  57.           if (ch2 != NUL)
  58.           {
  59. !             typeahead[typeaheadlen + 1] = 3;
  60. !             typeahead[typeaheadlen + 2] = ch2;
  61. !             n += 2;
  62.           }
  63.   #ifdef FEAT_MBYTE
  64.           /* Only convert normal characters, not special keys.  Need to
  65. ***************
  66. *** 1800,1805 ****
  67. --- 1801,1807 ----
  68.           if (input_conv.vc_type != CONV_NONE
  69.                           && (ch2 == NUL || c != K_NUL))
  70.           {
  71. +             conv = TRUE;
  72.               typeaheadlen -= unconverted;
  73.               n = convert_input_safe(typeahead + typeaheadlen,
  74.                   n + unconverted, TYPEAHEADLEN - typeaheadlen,
  75. ***************
  76. *** 1807,1812 ****
  77. --- 1809,1832 ----
  78.           }
  79.   #endif
  80.   
  81. +         if (conv)
  82. +         {
  83. +             char_u *p = typeahead + typeaheadlen;
  84. +             char_u *e = typeahead + TYPEAHEADLEN;
  85. +             while (*p && p < e)
  86. +             {
  87. +             if (*p == K_NUL)
  88. +             {
  89. +                 ++p;
  90. +                 mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
  91. +                 *p = 3;
  92. +                 ++n;
  93. +             }
  94. +             ++p;
  95. +             }
  96. +         }
  97.           /* Use the ALT key to set the 8th bit of the character
  98.            * when it's one byte, the 8th bit isn't set yet and not
  99.            * using a double-byte encoding (would become a lead
  100. *** ../vim-7.4.362/src/term.c    2014-07-09 19:13:45.003701718 +0200
  101. --- src/term.c    2014-07-09 20:26:28.655613029 +0200
  102. ***************
  103. *** 3724,3730 ****
  104. --- 3724,3734 ----
  105.       return;
  106.       }
  107.   
  108. + #if defined(WIN3264) && !defined(FEAT_GUI)
  109. +     s = vim_strnsave(string, (int)STRLEN(string) + 1);
  110. + #else
  111.       s = vim_strsave(string);
  112. + #endif
  113.       if (s == NULL)
  114.       return;
  115.   
  116. ***************
  117. *** 3734,3739 ****
  118. --- 3738,3752 ----
  119.       STRMOVE(s, s + 1);
  120.       s[0] = term_7to8bit(string);
  121.       }
  122. + #if defined(WIN3264) && !defined(FEAT_GUI)
  123. +     if (s[0] == K_NUL)
  124. +     {
  125. +         STRMOVE(s + 1, s);
  126. +         s[1] = 3;
  127. +     }
  128. + #endif
  129.       len = (int)STRLEN(s);
  130.   
  131.       need_gather = TRUE;        /* need to fill termleader[] */
  132. *** ../vim-7.4.362/src/version.c    2014-07-09 20:20:40.359620108 +0200
  133. --- src/version.c    2014-07-09 20:26:38.903612821 +0200
  134. ***************
  135. *** 736,737 ****
  136. --- 736,739 ----
  137.   {   /* Add new patch number below this line */
  138. + /**/
  139. +     363,
  140.   /**/
  141.  
  142. -- 
  143. BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
  144. ANOTHER MONK:    And St.  Attila raised his hand grenade up on high saying "O
  145.                  Lord bless this thy hand grenade that with it thou mayest
  146.                  blow thine enemies to tiny bits, in thy mercy. "and the Lord
  147.                  did grin and people did feast upon the lambs and sloths and
  148.                  carp and anchovies and orang-utans and breakfast cereals and
  149.                  fruit bats and...
  150. BROTHER MAYNARD: Skip a bit brother ...
  151.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  152.  
  153.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  154. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  155. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  156.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  157.