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.0.269 < prev    next >
Encoding:
Internet Message Format  |  2002-02-21  |  4.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.269
  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.0.269
  11. Problem:    Unprintable characters in a file name may cause problems when
  12.         using the 'statusline' option or when 'buftype' is "nofile".
  13. Solution:   call trans_characters() for the resulting statusline. (Yasuhiro
  14.         Matsumoto)
  15. Files:        src/buffer.c, src/charset.c, src/screen.c
  16.  
  17.  
  18. *** ../vim60.268/src/buffer.c    Thu Feb 21 13:59:30 2002
  19. --- src/buffer.c    Fri Feb 22 13:14:18 2002
  20. ***************
  21. *** 3030,3037 ****
  22.           t = (opt == STL_FULLPATH) ? wp->w_buffer->b_ffname
  23.                       : wp->w_buffer->b_fname;
  24.           home_replace(wp->w_buffer, t, NameBuff, MAXPATHL, TRUE);
  25. -         trans_characters(NameBuff, MAXPATHL);
  26.           }
  27.           if (opt != STL_FILENAME)
  28.           str = NameBuff;
  29.           else
  30. --- 3030,3037 ----
  31.           t = (opt == STL_FULLPATH) ? wp->w_buffer->b_ffname
  32.                       : wp->w_buffer->b_fname;
  33.           home_replace(wp->w_buffer, t, NameBuff, MAXPATHL, TRUE);
  34.           }
  35. +         trans_characters(NameBuff, MAXPATHL);
  36.           if (opt != STL_FILENAME)
  37.           str = NameBuff;
  38.           else
  39. *** ../vim60.268/src/charset.c    Thu Feb 21 13:59:30 2002
  40. --- src/charset.c    Fri Feb 22 16:53:26 2002
  41. ***************
  42. *** 274,279 ****
  43. --- 274,281 ----
  44.       return OK;
  45.   }
  46.   
  47. + #if defined(FEAT_TITLE) || defined(FEAT_STL_OPT) || defined(FEAT_WINDOWS) \
  48. +     || defined(PROTO)
  49.   /*
  50.    * Translate any special characters in buf[bufsize] in-place.
  51.    * The result is a string with only printable characters, but if there is not
  52. ***************
  53. *** 293,304 ****
  54.       room = bufsize - len;
  55.       while (*buf != 0)
  56.       {
  57. ! #ifdef FEAT_MBYTE
  58.       /* Assume a multi-byte character doesn't need translation. */
  59.       if (has_mbyte && (trs_len = (*mb_ptr2len_check)(buf)) > 1)
  60.           len -= trs_len;
  61.       else
  62. ! #endif
  63.       {
  64.           trs = transchar_byte(*buf);
  65.           trs_len = (int)STRLEN(trs);
  66. --- 295,306 ----
  67.       room = bufsize - len;
  68.       while (*buf != 0)
  69.       {
  70. ! # ifdef FEAT_MBYTE
  71.       /* Assume a multi-byte character doesn't need translation. */
  72.       if (has_mbyte && (trs_len = (*mb_ptr2len_check)(buf)) > 1)
  73.           len -= trs_len;
  74.       else
  75. ! # endif
  76.       {
  77.           trs = transchar_byte(*buf);
  78.           trs_len = (int)STRLEN(trs);
  79. ***************
  80. *** 315,320 ****
  81. --- 317,323 ----
  82.       buf += trs_len;
  83.       }
  84.   }
  85. + #endif
  86.   
  87.   #if defined(FEAT_EVAL) || defined(FEAT_TITLE) || defined(PROTO)
  88.   /*
  89. *** ../vim60.268/src/screen.c    Thu Feb 21 13:59:30 2002
  90. --- src/screen.c    Fri Feb 22 13:09:30 2002
  91. ***************
  92. *** 4676,4686 ****
  93.       if (buf_spname(wp->w_buffer) != NULL)
  94.           STRCPY(NameBuff, buf_spname(wp->w_buffer));
  95.       else
  96. -     {
  97.           home_replace(wp->w_buffer, wp->w_buffer->b_fname, NameBuff,
  98.                                     MAXPATHL, TRUE);
  99. !         trans_characters(NameBuff, MAXPATHL);
  100. !     }
  101.       p = NameBuff;
  102.       len = (int)STRLEN(p);
  103.   
  104. --- 4681,4689 ----
  105.       if (buf_spname(wp->w_buffer) != NULL)
  106.           STRCPY(NameBuff, buf_spname(wp->w_buffer));
  107.       else
  108.           home_replace(wp->w_buffer, wp->w_buffer->b_fname, NameBuff,
  109.                                     MAXPATHL, TRUE);
  110. !     trans_characters(NameBuff, MAXPATHL);
  111.       p = NameBuff;
  112.       len = (int)STRLEN(p);
  113.   
  114. ***************
  115. *** 4948,4954 ****
  116.   
  117.       for (p = buf + len; p < buf + maxlen; p++)
  118.       *p = fillchar;
  119. !     buf[maxlen] = 0;
  120.   
  121.       curattr = attr;
  122.       p = buf;
  123. --- 4951,4957 ----
  124.   
  125.       for (p = buf + len; p < buf + maxlen; p++)
  126.       *p = fillchar;
  127. !     buf[maxlen] = NUL;
  128.   
  129.       curattr = attr;
  130.       p = buf;
  131. *** ../vim60.268/src/version.c    Fri Feb 22 20:54:34 2002
  132. --- src/version.c    Fri Feb 22 20:58:54 2002
  133. ***************
  134. *** 608,609 ****
  135. --- 608,611 ----
  136.   {   /* Add new patch number below this line */
  137. + /**/
  138. +     269,
  139.   /**/
  140.  
  141. -- 
  142. hundred-and-one symptoms of being an internet addict:
  143. 8. You spend half of the plane trip with your laptop on your lap...and your
  144.    child in the overhead compartment.
  145.  
  146.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  147. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  148. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  149.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  150.