Loading ...
Sorry, an error occurred while loading the content.

Re: [vim-multibyte] showmatch and multibyte

Expand Messages
  • Taro Muraoka
    ... Yes. It is my mistake. Here new patch available. ... Taro Muraoka Problem: With showmatch option, when insert a multibyte
    Message 1 of 3 , Jun 17, 2000
    • 0 Attachment
      > Shouldn't that be:
      >
      > && !(is_dbcs && IsTrailByte(newp, p))
      >
      > Otherwise showmatch() will never be called when is_dbcs isn't set.

      Yes. It is my mistake. Here new patch available.
      ----
      Taro Muraoka <koron@...>


      Problem: With showmatch option, when insert a multibyte character
      that trailbyte is 0x29(')') or 0x5D(']') or 0x7D('}'),
      that cause a redundant showmatch.
      Solution: Check IsTrailByte before showmatch().
      Files: src/misc1.c

      *** vim-5.7a/src/misc1.c Tue Jun 06 03:45:42 2000
      --- vim-5.7a/src.j/misc1.c Wed Jun 14 09:56:44 2000
      ***************
      *** 1461,1473 ****
      * is a match AND it's on the screen, then flash to it briefly. If it
      * isn't on the screen, don't do anything.
      */
      - #ifdef RIGHTLEFT
      if (p_sm && (State & INSERT) &&
      ! ((!(curwin->w_p_rl ^ p_ri) && (c == ')' || c == '}' || c == ']')) ||
      ! ((curwin->w_p_rl ^ p_ri) && (c == '(' || c == '{' || c == '['))))
      #else
      ! if (p_sm && (State & INSERT) && (c == ')' || c == '}' || c == ']'))
      #endif
      showmatch();

      #ifdef RIGHTLEFT
      --- 1461,1478 ----
      * is a match AND it's on the screen, then flash to it briefly. If it
      * isn't on the screen, don't do anything.
      */
      if (p_sm && (State & INSERT) &&
      ! #ifdef RIGHTLEFT
      ! ((!(curwin->w_p_rl ^ p_ri) && (c == ')' || c == '}' || c == ']')) ||
      ! ((curwin->w_p_rl ^ p_ri) && (c == '(' || c == '{' || c == '[')))
      #else
      ! (c == ')' || c == '}' || c == ']')
      ! #endif
      ! #ifdef MULTI_BYTE
      ! /* Don't showmatch() when c is trailbyte */
      ! && !(is_dbcs && IsTrailByte(newp, p))
      #endif
      + )
      showmatch();

      #ifdef RIGHTLEFT
    Your message has been successfully submitted and would be delivered to recipients shortly.