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.011 < prev    next >
Encoding:
Internet Message Format  |  2002-04-07  |  4.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.011
  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.011
  11. Problem:    XIM: doesn't work correctly when 'number' is set.  Also, a focus
  12.         problem when selecting candidates.
  13. Solution:   Fix the XIM problems. (Yasuhiro Matsumoto)
  14. Files:        src/mbyte.c, src/screen.c
  15.  
  16.  
  17. *** ../vim61.010/src/mbyte.c    Sat Mar 30 17:15:14 2002
  18. --- src/mbyte.c    Fri Apr  5 21:26:15 2002
  19. ***************
  20. *** 3728,3734 ****
  21.       {
  22.       event_queue = key_press_event_queue;
  23.       processing_queued_event = TRUE;
  24. !     while (event_queue != NULL)
  25.       {
  26.           GdkEvent *ev = event_queue->data;
  27.   
  28. --- 3728,3734 ----
  29.       {
  30.       event_queue = key_press_event_queue;
  31.       processing_queued_event = TRUE;
  32. !     while (event_queue != NULL && processing_queued_event)
  33.       {
  34.           GdkEvent *ev = event_queue->data;
  35.   
  36. ***************
  37. *** 3790,3797 ****
  38.       int
  39.   xim_queue_key_press_event(GdkEvent *ev)
  40.   {
  41. !     if (preedit_buf_len <= 0 || processing_queued_event)
  42.       return FALSE;
  43.   
  44.       key_press_event_queue = g_slist_append(key_press_event_queue,
  45.                          gdk_event_copy(ev));
  46. --- 3790,3799 ----
  47.       int
  48.   xim_queue_key_press_event(GdkEvent *ev)
  49.   {
  50. !     if (preedit_buf_len <= 0)
  51.       return FALSE;
  52. +     if (processing_queued_event)
  53. +     processing_queued_event = FALSE;
  54.   
  55.       key_press_event_queue = g_slist_append(key_press_event_queue,
  56.                          gdk_event_copy(ev));
  57. *** ../vim61.010/src/screen.c    Sat Mar 30 17:11:06 2002
  58. --- src/screen.c    Mon Apr  8 19:50:11 2002
  59. ***************
  60. *** 2418,2423 ****
  61. --- 2418,2427 ----
  62.   #endif
  63.   #define WL_LINE        WL_SBR + 1    /* text in the line */
  64.       int        draw_state = WL_START;    /* what to draw next */
  65. + #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
  66. +     int        feedback_col = 0;
  67. +     int        feedback_old_attr = -1;
  68. + #endif
  69.   
  70.   
  71.       if (startrow > endrow)        /* past the end already! */
  72. ***************
  73. *** 3500,3539 ****
  74.           && State == INSERT
  75.           && im_get_status()
  76.           && !p_imdisable
  77. !         && preedit_start_col != MAXCOL)
  78.       {
  79.           colnr_T tcol;
  80. -         static int  bcol = 0;
  81. -         static int    old_attr = -1;
  82.   
  83.           getvcol(curwin, &(curwin->w_cursor), &tcol, NULL, NULL);
  84.           if ((long)preedit_start_col <= vcol && vcol < (long)tcol)
  85.           {
  86. !         if (old_attr == -1)
  87.           {
  88. !             bcol = 0;
  89. !             old_attr = char_attr;
  90.           }
  91.           if (draw_feedback != NULL)
  92.           {
  93. !             if (draw_feedback[bcol] & XIMReverse)
  94.               char_attr = HL_INVERSE;
  95. !             else if (draw_feedback[bcol] & XIMUnderline)
  96.               char_attr = HL_UNDERLINE;
  97.               else
  98.               char_attr = hl_attr(HLF_V);
  99.           }
  100.           else
  101. !             char_attr = old_attr;
  102. !         bcol++;
  103.           }
  104.           else
  105.           {
  106. !         if (old_attr >= 0)
  107.           {
  108. !             char_attr = old_attr;
  109. !             old_attr = -1;
  110. !             bcol = 0;
  111.           }
  112.           }
  113.       }
  114. --- 3505,3543 ----
  115.           && State == INSERT
  116.           && im_get_status()
  117.           && !p_imdisable
  118. !         && preedit_start_col != MAXCOL
  119. !         && draw_state == WL_LINE)
  120.       {
  121.           colnr_T tcol;
  122.   
  123.           getvcol(curwin, &(curwin->w_cursor), &tcol, NULL, NULL);
  124.           if ((long)preedit_start_col <= vcol && vcol < (long)tcol)
  125.           {
  126. !         if (feedback_old_attr == -1)
  127.           {
  128. !             feedback_col = 0;
  129. !             feedback_old_attr = char_attr;
  130.           }
  131.           if (draw_feedback != NULL)
  132.           {
  133. !             if (draw_feedback[feedback_col] & XIMReverse)
  134.               char_attr = HL_INVERSE;
  135. !             else if (draw_feedback[feedback_col] & XIMUnderline)
  136.               char_attr = HL_UNDERLINE;
  137.               else
  138.               char_attr = hl_attr(HLF_V);
  139.           }
  140.           else
  141. !             char_attr = feedback_old_attr;
  142. !         feedback_col++;
  143.           }
  144.           else
  145.           {
  146. !         if (feedback_old_attr >= 0)
  147.           {
  148. !             char_attr = feedback_old_attr;
  149. !             feedback_old_attr = -1;
  150. !             feedback_col = 0;
  151.           }
  152.           }
  153.       }
  154. *** ../vim61.010/src/version.c    Mon Apr  8 22:11:31 2002
  155. --- src/version.c    Mon Apr  8 22:13:14 2002
  156. ***************
  157. *** 608,609 ****
  158. --- 608,611 ----
  159.   {   /* Add new patch number below this line */
  160. + /**/
  161. +     11,
  162.   /**/
  163.  
  164. -- 
  165. hundred-and-one symptoms of being an internet addict:
  166. 94. Now admit it... How many of you have made "modem noises" into
  167.     the phone just to see if it was possible? :-)
  168.  
  169.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  170. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  171. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  172.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  173.