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 / 6.1.223 < prev    next >
Encoding:
Internet Message Format  |  2002-10-13  |  5.2 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.223 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.223 (extra)
  11. Problem:    Win32: When IME is activated 'iminsert' is set, but it might never
  12.         be reset when IME is disabled. (Muraoka Taro)
  13.         All systems: 'iminsert' is set to 2 when leaving Insert mode, even
  14.         when langmap is being used. (Peter Valach)
  15. Solution:   Don't set "b_p_iminsert" in _OnImeNotify(). (Muraoka Taro)
  16.         Don't store the status of the input method in 'iminsert' when
  17.         'iminsert' is one.  Also for editing the command line and for
  18.         arguments to Normal mode commands.
  19. Files:        src/edit.c, src/ex_getln.c, src/gui_w32.c, src/normal.c
  20.  
  21.  
  22. *** ../vim61.222/src/edit.c    Sun Oct 13 20:08:13 2002
  23. --- src/edit.c    Mon Oct 14 20:11:55 2002
  24. ***************
  25. *** 338,343 ****
  26. --- 338,349 ----
  27.        */
  28.       curs_columns(TRUE);
  29.   
  30. +     /*
  31. +      * Enable langmap or IME, indicated by 'iminsert'.
  32. +      * Note that IME may enabled/disabled without us noticing here, thus the
  33. +      * 'iminsert' value may not reflect what is actually used.  It is updated
  34. +      * when hitting <Esc>.
  35. +      */
  36.       if (curbuf->b_p_iminsert == B_IMODE_LMAP)
  37.       State |= LANGMAP;
  38.   #ifdef USE_IM_CONTROL
  39. ***************
  40. *** 843,849 ****
  41.           if (map_to_exists_mode((char_u *)"", LANGMAP))
  42.           {
  43.           /* ":lmap" mappings exists, Toggle use of ":lmap" mappings. */
  44. !         if (curbuf->b_p_iminsert == B_IMODE_LMAP)
  45.           {
  46.               curbuf->b_p_iminsert = B_IMODE_NONE;
  47.               State &= ~LANGMAP;
  48. --- 849,855 ----
  49.           if (map_to_exists_mode((char_u *)"", LANGMAP))
  50.           {
  51.           /* ":lmap" mappings exists, Toggle use of ":lmap" mappings. */
  52. !         if (State & LANGMAP)
  53.           {
  54.               curbuf->b_p_iminsert = B_IMODE_NONE;
  55.               State &= ~LANGMAP;
  56. ***************
  57. *** 861,867 ****
  58.           else
  59.           {
  60.           /* There are no ":lmap" mappings, toggle IM */
  61. !         if (curbuf->b_p_iminsert == B_IMODE_IM)
  62.           {
  63.               curbuf->b_p_iminsert = B_IMODE_NONE;
  64.               im_set_active(FALSE);
  65. --- 867,873 ----
  66.           else
  67.           {
  68.           /* There are no ":lmap" mappings, toggle IM */
  69. !         if (im_get_status())
  70.           {
  71.               curbuf->b_p_iminsert = B_IMODE_NONE;
  72.               im_set_active(FALSE);
  73. ***************
  74. *** 5874,5881 ****
  75.   #endif
  76.   
  77.   #ifdef USE_IM_CONTROL
  78. !     /* Disable IM to allow typing English directly for Normal mode commands. */
  79. !     im_save_status(&curbuf->b_p_iminsert);
  80.       im_set_active(FALSE);
  81.   #endif
  82.   
  83. --- 5880,5890 ----
  84.   #endif
  85.   
  86.   #ifdef USE_IM_CONTROL
  87. !     /* Disable IM to allow typing English directly for Normal mode commands.
  88. !      * When ":lmap" is enabled don't change 'iminsert' (IM can be enabled as
  89. !      * well). */
  90. !     if (!(State & LANGMAP))
  91. !     im_save_status(&curbuf->b_p_iminsert);
  92.       im_set_active(FALSE);
  93.   #endif
  94.   
  95. *** ../vim61.222/src/ex_getln.c    Sun Oct 13 20:08:14 2002
  96. --- src/ex_getln.c    Sun Oct 13 15:35:07 2002
  97. ***************
  98. *** 1526,1532 ****
  99.   
  100.       State = save_State;
  101.   #ifdef USE_IM_CONTROL
  102. !     if (b_im_ptr != NULL)
  103.       im_save_status(b_im_ptr);
  104.       im_set_active(FALSE);
  105.   #endif
  106. --- 1526,1532 ----
  107.   
  108.       State = save_State;
  109.   #ifdef USE_IM_CONTROL
  110. !     if (b_im_ptr != NULL && *b_im_ptr != B_IMODE_LMAP)
  111.       im_save_status(b_im_ptr);
  112.       im_set_active(FALSE);
  113.   #endif
  114. *** ../vim61.222/src/gui_w32.c    Mon Sep 16 22:00:32 2002
  115. --- src/gui_w32.c    Tue Oct  8 21:11:49 2002
  116. ***************
  117. *** 1372,1384 ****
  118.           State &= ~LANGMAP;
  119.           if (State & INSERT)
  120.           {
  121. -             long old_imi = curbuf->b_p_iminsert;
  122. -             curbuf->b_p_iminsert = B_IMODE_IM;
  123.   #if defined(FEAT_WINDOWS) && defined(FEAT_KEYMAP)
  124.               /* Unshown 'keymap' in status lines */
  125. !             if (old_imi == B_IMODE_LMAP)
  126.               {
  127.               /* Save cursor position */
  128.               int old_row = gui.row;
  129. --- 1367,1375 ----
  130.           State &= ~LANGMAP;
  131.           if (State & INSERT)
  132.           {
  133.   #if defined(FEAT_WINDOWS) && defined(FEAT_KEYMAP)
  134.               /* Unshown 'keymap' in status lines */
  135. !             if (curbuf->b_p_iminsert == B_IMODE_LMAP)
  136.               {
  137.               /* Save cursor position */
  138.               int old_row = gui.row;
  139. *** ../vim61.222/src/normal.c    Sun Oct 13 16:05:33 2002
  140. --- src/normal.c    Sun Oct 13 15:14:34 2002
  141. ***************
  142. *** 915,921 ****
  143.   #ifdef USE_IM_CONTROL
  144.           if (lang)
  145.           {
  146. !         im_save_status(&curbuf->b_p_iminsert);
  147.           im_set_active(FALSE);
  148.           }
  149.           p_smd = save_smd;
  150. --- 915,922 ----
  151.   #ifdef USE_IM_CONTROL
  152.           if (lang)
  153.           {
  154. !         if (curbuf->b_p_iminsert != B_IMODE_LMAP)
  155. !             im_save_status(&curbuf->b_p_iminsert);
  156.           im_set_active(FALSE);
  157.           }
  158.           p_smd = save_smd;
  159. *** ../vim61.222/src/version.c    Sun Oct 13 20:12:29 2002
  160. --- src/version.c    Mon Oct 14 20:08:46 2002
  161. ***************
  162. *** 608,609 ****
  163. --- 608,611 ----
  164.   {   /* Add new patch number below this line */
  165. + /**/
  166. +     223,
  167.   /**/
  168.  
  169. -- 
  170. From the classified section of a city newspaper:
  171. Dog for sale: eats anything and is fond of children.
  172.  
  173.  
  174.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  175. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  176. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  177.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  178.