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.268 < prev    next >
Encoding:
Internet Message Format  |  2003-01-01  |  3.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.268
  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.268
  11. Problem:    When triggering an abbreviation with a multi-byte character, this
  12.         character is not correctly inserted after expanding the
  13.         abbreviation. (Taro Muraoka)
  14. Solution:   Add ABBR_OFF to all characters above 0xff.
  15. Files:        src/edit.c, src/ex_getln.c, src/getchar.c
  16.  
  17.  
  18. *** ../vim61.267/src/edit.c    Sun Oct 27 14:40:49 2002
  19. --- src/edit.c    Sun Dec 29 13:03:22 2002
  20. ***************
  21. *** 1240,1246 ****
  22.               Insstart_blank_vcol = get_nolist_virtcol();
  23.           }
  24.   
  25. !         if (vim_iswordc(c) || !echeck_abbr(c))
  26.           {
  27.           insert_special(c, FALSE, FALSE);
  28.   #ifdef FEAT_RIGHTLEFT
  29. --- 1240,1252 ----
  30.               Insstart_blank_vcol = get_nolist_virtcol();
  31.           }
  32.   
  33. !         if (vim_iswordc(c) || !echeck_abbr(
  34. ! #ifdef FEAT_MBYTE
  35. !             /* Add ABBR_OFF for characters above 0x100, this is
  36. !              * what check_abbr() expects. */
  37. !             (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) :
  38. ! #endif
  39. !             c))
  40.           {
  41.           insert_special(c, FALSE, FALSE);
  42.   #ifdef FEAT_RIGHTLEFT
  43. *** ../vim61.267/src/ex_getln.c    Mon Oct 14 20:18:19 2002
  44. --- src/ex_getln.c    Sun Dec 29 13:06:07 2002
  45. ***************
  46. *** 1341,1347 ****
  47.        * We come here if we have a normal character.
  48.        */
  49.   
  50. !     if (do_abbr && (IS_SPECIAL(c) || !vim_iswordc(c)) && ccheck_abbr(c))
  51.           goto cmdline_changed;
  52.   
  53.       /*
  54. --- 1341,1353 ----
  55.        * We come here if we have a normal character.
  56.        */
  57.   
  58. !     if (do_abbr && (IS_SPECIAL(c) || !vim_iswordc(c)) && ccheck_abbr(
  59. ! #ifdef FEAT_MBYTE
  60. !             /* Add ABBR_OFF for characters above 0x100, this is
  61. !              * what check_abbr() expects. */
  62. !             (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) :
  63. ! #endif
  64. !                                     c))
  65.           goto cmdline_changed;
  66.   
  67.       /*
  68. *** ../vim61.267/src/getchar.c    Tue Nov 19 13:53:29 2002
  69. --- src/getchar.c    Sun Dec 29 13:00:50 2002
  70. ***************
  71. *** 3727,3733 ****
  72.   /*
  73.    * Check for an abbreviation.
  74.    * Cursor is at ptr[col]. When inserting, mincol is where insert started.
  75. !  * "c" is the character typed before check_abbr was called.
  76.    *
  77.    * Historic vi practice: The last character of an abbreviation must be an id
  78.    * character ([a-zA-Z0-9_]). The characters in front of it must be all id
  79. --- 3727,3734 ----
  80.   /*
  81.    * Check for an abbreviation.
  82.    * Cursor is at ptr[col]. When inserting, mincol is where insert started.
  83. !  * "c" is the character typed before check_abbr was called.  It may have
  84. !  * ABBR_OFF added to avoid prepending a CTRL-V to it.
  85.    *
  86.    * Historic vi practice: The last character of an abbreviation must be an id
  87.    * character ([a-zA-Z0-9_]). The characters in front of it must be all id
  88. ***************
  89. *** 3879,3885 ****
  90. --- 3880,3891 ----
  91.               tb[j++] = Ctrl_V;    /* special char needs CTRL-V */
  92.   #ifdef FEAT_MBYTE
  93.               if (has_mbyte)
  94. +             {
  95. +             /* if ABBR_OFF has been added, remove it here */
  96. +             if (c >= ABBR_OFF)
  97. +                 c -= ABBR_OFF;
  98.               j += (*mb_char2bytes)(c, tb + j);
  99. +             }
  100.               else
  101.   #endif
  102.               tb[j++] = c;
  103. *** ../vim61.267/src/version.c    Sat Dec 28 17:33:31 2002
  104. --- src/version.c    Thu Jan  2 21:05:23 2003
  105. ***************
  106. *** 608,609 ****
  107. --- 608,611 ----
  108.   {   /* Add new patch number below this line */
  109. + /**/
  110. +     268,
  111.   /**/
  112.  
  113. -- 
  114. This is an airconditioned room, do not open Windows.
  115.  
  116.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  117. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  118. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  119.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  120.