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 / old / 5.6.094 < prev    next >
Encoding:
Internet Message Format  |  2000-06-07  |  2.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.6.094
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.6.094
  8. Problem:    Problem with multi-byte string for ":echo var".
  9. Solution:   Check for length in msg_outtrans_len_attr(). (Sung-Hyun Nam)
  10.         Also make do_echo() aware of multi-byte characters.
  11. Files:        src/eval.c, src/message.c
  12.  
  13.  
  14. *** ../vim-5.6.93/src/eval.c    Fri Mar 31 14:23:11 2000
  15. --- src/eval.c    Tue Jun  6 12:55:14 2000
  16. ***************
  17. *** 4663,4669 ****
  18.               msg_putchar_attr(*p, echo_attr);
  19.           }
  20.           else
  21. !             (void)msg_outtrans_len_attr(p, 1, echo_attr);
  22.       }
  23.       clear_var(&retvar);
  24.       arg = skipwhite(arg);
  25. --- 4663,4680 ----
  26.               msg_putchar_attr(*p, echo_attr);
  27.           }
  28.           else
  29. !         {
  30. ! #ifdef MULTI_BYTE
  31. !             /* check multibyte */
  32. !             if (is_dbcs && p[1] != NUL && IsLeadByte(*p))
  33. !             {
  34. !             (void)msg_outtrans_len_attr(p, 2, echo_attr);
  35. !             ++p;
  36. !             }
  37. !             else
  38. ! #endif
  39. !             (void)msg_outtrans_len_attr(p, 1, echo_attr);
  40. !         }
  41.       }
  42.       clear_var(&retvar);
  43.       arg = skipwhite(arg);
  44. *** ../vim-5.6.93/src/message.c    Mon Jun  5 13:12:48 2000
  45. --- src/message.c    Tue Jun  6 12:45:32 2000
  46. ***************
  47. *** 859,865 ****
  48.       {
  49.   #ifdef MULTI_BYTE
  50.       /* check multibyte */
  51. !     if (is_dbcs && *(str + 1) != NUL && IsLeadByte(*str))
  52.       {
  53.           char_u buf[3];
  54.   
  55. --- 859,865 ----
  56.       {
  57.   #ifdef MULTI_BYTE
  58.       /* check multibyte */
  59. !     if (is_dbcs && len > 0 && IsLeadByte(*str))
  60.       {
  61.           char_u buf[3];
  62.   
  63. *** ../vim-5.6.93/src/version.c    Tue Jun  6 19:32:22 2000
  64. --- src/version.c    Wed Jun  7 14:01:55 2000
  65. ***************
  66. *** 420,421 ****
  67. --- 420,423 ----
  68.   {   /* Add new patch number below this line */
  69. + /**/
  70. +     94,
  71.   /**/
  72.  
  73. -- 
  74. An easy way to determine if you have enough teamwork to be doomed is simply to
  75. measure how long it takes from the time you decide to go to lunch together
  76. until the time you actually eat.
  77.                 (Scott Adams - The Dilbert principle)
  78.  
  79. /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\
  80. \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
  81.