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 / unreleased / patches / 5.7a.002 < prev    next >
Encoding:
Internet Message Format  |  2000-06-17  |  2.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.7a.002
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.7a.002
  8. Problem:    Multi-byte: 'showmatch' is performed when second byte of an
  9.         inserted double-byte char is a paren or brace.
  10. Solution:   Check IsTrailByte() before calling showmatch(). (Taro Muraoka)
  11. Files:        src/misc1.c
  12.  
  13.  
  14. *** ../vim-5.7a.1/src/misc1.c    Mon Jun  5 20:45:41 2000
  15. --- src/misc1.c    Wed Jun 14 21:51:17 2000
  16. ***************
  17. *** 1456,1473 ****
  18.       ml_replace(lnum, newp, FALSE);
  19.   
  20.       /*
  21. !      * If we're in insert or replace mode and 'showmatch' is set, then check for
  22. !      * right parens and braces. If there isn't a match, then beep. If there
  23. !      * is a match AND it's on the screen, then flash to it briefly. If it
  24. !      * isn't on the screen, don't do anything.
  25.        */
  26.   #ifdef RIGHTLEFT
  27. !     if (p_sm && (State & INSERT) &&
  28. !     ((!(curwin->w_p_rl ^ p_ri) && (c == ')' || c == '}' || c == ']')) ||
  29. !      ((curwin->w_p_rl ^ p_ri) && (c == '(' || c == '{' || c == '['))))
  30.   #else
  31. !     if (p_sm && (State & INSERT) && (c == ')' || c == '}' || c == ']'))
  32.   #endif
  33.       showmatch();
  34.   
  35.   #ifdef RIGHTLEFT
  36. --- 1456,1477 ----
  37.       ml_replace(lnum, newp, FALSE);
  38.   
  39.       /*
  40. !      * If we're in Insert or Replace mode and 'showmatch' is set, then briefly
  41. !      * show the match for right parens and braces.
  42.        */
  43. +     if (p_sm && (State & INSERT)
  44.   #ifdef RIGHTLEFT
  45. !         && ((!(curwin->w_p_rl ^ p_ri)
  46. !             && (c == ')' || c == '}' || c == ']'))
  47. !         || ((curwin->w_p_rl ^ p_ri)
  48. !             && (c == '(' || c == '{' || c == '[')))
  49.   #else
  50. !         && (c == ')' || c == '}' || c == ']')
  51.   #endif
  52. + #ifdef MULTI_BYTE
  53. +         && !(is_dbcs && IsTrailByte(newp, p))
  54. + #endif
  55. +        )
  56.       showmatch();
  57.   
  58.   #ifdef RIGHTLEFT
  59. *** ../vim-5.7a.1/src/version.c    Sun Jun 18 15:30:49 2000
  60. --- src/version.c    Sun Jun 18 15:31:39 2000
  61. ***************
  62. *** 420,421 ****
  63. --- 420,423 ----
  64.   {   /* Add new patch number below this line */
  65. + /**/
  66. +     2,
  67.   /**/
  68.  
  69. -- 
  70. hundred-and-one symptoms of being an internet addict:
  71. 49. You never have to deal with busy signals when calling your ISP...because
  72.     you never log off.
  73.  
  74. /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\
  75. \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
  76.