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.413 < prev    next >
Encoding:
Internet Message Format  |  2014-08-22  |  3.2 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.413
  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.413
  11. Problem:    MS-Windows: Using US international keyboard layout, inserting dead
  12.         key by pressing space does not always work.  Issue 250.
  13. Solution:   Let MS-Windows translate the message. (John Wellesz)
  14. Files:        src/gui_w48.c
  15.  
  16.  
  17. *** ../vim-7.4.412/src/gui_w48.c    2014-08-06 14:52:05.043236174 +0200
  18. --- src/gui_w48.c    2014-08-22 18:41:09.151182571 +0200
  19. ***************
  20. *** 614,619 ****
  21. --- 614,621 ----
  22.       char_u    string[40];
  23.       int        len = 0;
  24.   
  25. +     dead_key = 0;
  26.       len = char_to_string(ch, string, 40, FALSE);
  27.       if (len == 1 && string[0] == Ctrl_C && ctrl_c_interrupts)
  28.       {
  29. ***************
  30. *** 1788,1811 ****
  31.       if (msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN)
  32.       {
  33.       vk = (int) msg.wParam;
  34. !     /* handle key after dead key, but ignore shift, alt and control */
  35. !     if (dead_key && vk != VK_SHIFT && vk != VK_MENU && vk != VK_CONTROL)
  36.       {
  37.           dead_key = 0;
  38. !         /* handle non-alphabetic keys (ones that hopefully cannot generate
  39. !          * umlaut-characters), unless when control is down */
  40. !         if (vk < 'A' || vk > 'Z' || (GetKeyState(VK_CONTROL) & 0x8000))
  41. !         {
  42. !         MSG dm;
  43. !         dm.message = msg.message;
  44. !         dm.hwnd = msg.hwnd;
  45. !         dm.wParam = VK_SPACE;
  46. !         MyTranslateMessage(&dm);    /* generate dead character */
  47. !         if (vk != VK_SPACE) /* and send current character once more */
  48. !             PostMessage(msg.hwnd, msg.message, msg.wParam, msg.lParam);
  49. !         return;
  50. !         }
  51.       }
  52.   
  53.       /* Check for CTRL-BREAK */
  54. --- 1790,1810 ----
  55.       if (msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN)
  56.       {
  57.       vk = (int) msg.wParam;
  58. !     /*
  59. !      * If a dead key was pressed and the user presses VK_SPACE, VK_BACK, or
  60. !      * VK_ESCAPE it means that he actually wants to deal with the dead char
  61. !      * now, so do nothing special and let Windows handle it.
  62. !      *
  63. !      * Note that VK_SPACE combines with the dead_key's character and only
  64. !      * one WM_CHAR will be generated by TranslateMessage(), in the two
  65. !      * other cases two WM_CHAR will be generated: the dead char and VK_BACK
  66. !      * or VK_ESCAPE.  That is most likely what the user expects.
  67. !      */
  68. !     if (dead_key && (vk == VK_SPACE || vk == VK_BACK || vk == VK_ESCAPE))
  69.       {
  70.           dead_key = 0;
  71. !         MyTranslateMessage(&msg);
  72. !         return;
  73.       }
  74.   
  75.       /* Check for CTRL-BREAK */
  76. *** ../vim-7.4.412/src/version.c    2014-08-22 18:12:53.999244049 +0200
  77. --- src/version.c    2014-08-22 18:39:03.915187113 +0200
  78. ***************
  79. *** 743,744 ****
  80. --- 743,746 ----
  81.   {   /* Add new patch number below this line */
  82. + /**/
  83. +     413,
  84.   /**/
  85.  
  86. -- 
  87. hundred-and-one symptoms of being an internet addict:
  88. 43. You tell the kids they can't use the computer because "Daddy's got work to
  89.     do" and you don't even have a job.
  90.  
  91.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  92. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  93. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  94.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  95.