Patch 8.2.0889
Problem:    Using old style comments.
Solution:   Use // comments. (Yegappan Lakshmanan, closes #6190)
Files:      src/gui_xim.c


*** ../vim-8.2.0888/src/gui_xim.c       2020-06-01 14:34:22.027462262 +0200
--- src/gui_xim.c       2020-06-02 22:22:36.405863277 +0200
***************
*** 661,673 ****
  
        im_delete_preedit();
  
!       /*
!        * Compute the end of the preediting area: "preedit_end_col".
!        * According to the documentation of 
gtk_im_context_get_preedit_string(),
!        * the cursor_pos output argument returns the offset in bytes.  This is
!        * unfortunately not true -- real life shows the offset is in 
characters,
!        * and the GTK+ source code agrees with me.  Will file a bug later.
!        */
        if (preedit_start_col != MAXCOL)
            preedit_end_col = preedit_start_col;
        str = (char_u *)preedit_string;
--- 661,672 ----
  
        im_delete_preedit();
  
!       // Compute the end of the preediting area: "preedit_end_col".
!       // According to the documentation of
!       // gtk_im_context_get_preedit_string(), the cursor_pos output argument
!       // returns the offset in bytes.  This is unfortunately not true -- real
!       // life shows the offset is in characters, and the GTK+ source code
!       // agrees with me.  Will file a bug later.
        if (preedit_start_col != MAXCOL)
            preedit_end_col = preedit_start_col;
        str = (char_u *)preedit_string;
***************
*** 675,686 ****
        {
            int is_composing;
  
!           is_composing = ((*p & 0x80) != 0 && 
utf_iscomposing(utf_ptr2char(p)));
!           /*
!            * These offsets are used as counters when generating <BS> and <Del>
!            * to delete the preedit string.  So don't count composing 
characters
!            * unless 'delcombine' is enabled.
!            */
            if (!is_composing || p_deco)
            {
                if (i < cursor_index)
--- 674,684 ----
        {
            int is_composing;
  
!           is_composing = ((*p & 0x80) != 0
!                                         && utf_iscomposing(utf_ptr2char(p)));
!           // These offsets are used as counters when generating <BS> and
!           // <Del> to delete the preedit string.  So don't count composing
!           // characters unless 'delcombine' is enabled.
            if (!is_composing || p_deco)
            {
                if (i < cursor_index)
***************
*** 993,1009 ****
  {
      if (down)
      {
!       /*
!        * Workaround GTK2 XIM 'feature' that always converts keypad keys to
!        * chars., even when not part of an IM sequence (ref. feature of
!        * gdk/gdkkeyuni.c).
!        * Flag any keypad keys that might represent a single char.
!        * If this (on its own - i.e., not part of an IM sequence) is
!        * committed while we're processing one of these keys, we can ignore
!        * that commit and go ahead & process it ourselves.  That way we can
!        * still distinguish keypad keys for use in mappings.
!        * Also add GDK_space to make <S-Space> work.
!        */
        switch (event->keyval)
        {
            case GDK_KP_Add:      xim_expected_char = '+';  break;
--- 991,1005 ----
  {
      if (down)
      {
!       // Workaround GTK2 XIM 'feature' that always converts keypad keys to
!       // chars., even when not part of an IM sequence (ref. feature of
!       // gdk/gdkkeyuni.c).
!       // Flag any keypad keys that might represent a single char.
!       // If this (on its own - i.e., not part of an IM sequence) is
!       // committed while we're processing one of these keys, we can ignore
!       // that commit and go ahead & process it ourselves.  That way we can
!       // still distinguish keypad keys for use in mappings.
!       // Also add GDK_space to make <S-Space> work.
        switch (event->keyval)
        {
            case GDK_KP_Add:      xim_expected_char = '+';  break;
***************
*** 1028,1046 ****
        xim_ignored_char = FALSE;
      }
  
!     /*
!      * When typing fFtT, XIM may be activated. Thus it must pass
!      * gtk_im_context_filter_keypress() in Normal mode.
!      * And while doing :sh too.
!      */
      if (xic != NULL && !p_imdisable
                    && (State & (INSERT | CMDLINE | NORMAL | EXTERNCMD)) != 0)
      {
!       /*
!        * Filter 'imactivatekey' and map it to CTRL-^.  This way, Vim is
!        * always aware of the current status of IM, and can even emulate
!        * the activation key for modules that don't support one.
!        */
        if (event->keyval == im_activatekey_keyval
             && (event->state & im_activatekey_state) == im_activatekey_state)
        {
--- 1024,1038 ----
        xim_ignored_char = FALSE;
      }
  
!     // When typing fFtT, XIM may be activated. Thus it must pass
!     // gtk_im_context_filter_keypress() in Normal mode.
!     // And while doing :sh too.
      if (xic != NULL && !p_imdisable
                    && (State & (INSERT | CMDLINE | NORMAL | EXTERNCMD)) != 0)
      {
!       // Filter 'imactivatekey' and map it to CTRL-^.  This way, Vim is
!       // always aware of the current status of IM, and can even emulate
!       // the activation key for modules that don't support one.
        if (event->keyval == im_activatekey_keyval
             && (event->state & im_activatekey_state) == im_activatekey_state)
        {
***************
*** 1205,1214 ****
      if (xic == NULL)
        return;
  
!     /*
!      * XIM only gets focus when the Vim window has keyboard focus and XIM has
!      * been set active for the current mode.
!      */
      if (focus && xim_is_active)
      {
        if (!xim_has_focus)
--- 1197,1204 ----
      if (xic == NULL)
        return;
  
!     // XIM only gets focus when the Vim window has keyboard focus and XIM has
!     // been set active for the current mode.
      if (focus && xim_is_active)
      {
        if (!xim_has_focus)
*** ../vim-8.2.0888/src/version.c       2020-06-02 22:19:45.310490731 +0200
--- src/version.c       2020-06-02 22:24:11.241518589 +0200
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     889,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
261. You find diskettes in your pockets when doing laundry.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202006022025.052KP9Wq321733%40masaka.moolenaar.net.

Raspunde prin e-mail lui