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.053 < prev    next >
Encoding:
Internet Message Format  |  2002-05-04  |  2.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.053
  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.053
  11. Problem:    When 'sessionoptions' contains "globals", or "localoptions" and an
  12.         option value contains a line break, the resulting script is wrong.
  13. Solution:   Use "\n" and "\r" for a line break. (Srinath Avadhanula)
  14. Files:        src/eval.c
  15.  
  16.  
  17. *** ../vim61.052/src/eval.c    Sun Apr 21 15:46:47 2002
  18. --- src/eval.c    Sun Apr 28 18:09:17 2002
  19. ***************
  20. *** 8547,8553 ****
  21.       garray_T    *gap = &variables;        /* global variable */
  22.       VAR        this_var;
  23.       int        i;
  24. !     char_u    *p;
  25.   
  26.       for (i = gap->ga_len; --i >= 0; )
  27.       {
  28. --- 8547,8553 ----
  29.       garray_T    *gap = &variables;        /* global variable */
  30.       VAR        this_var;
  31.       int        i;
  32. !     char_u    *p, *t;
  33.   
  34.       for (i = gap->ga_len; --i >= 0; )
  35.       {
  36. ***************
  37. *** 8556,8563 ****
  38.       {
  39.           if (var_flavour(this_var->var_name) == VAR_FLAVOUR_SESSION)
  40.           {
  41.           p = vim_strsave_escaped(get_var_string(this_var),
  42. !                                 (char_u *)"\\\"");
  43.           if ((fprintf(fd, "let %s = %c%s%c",
  44.                   this_var->var_name,
  45.                   (this_var->var_type == VAR_STRING) ? '"' : ' ',
  46. --- 8556,8572 ----
  47.       {
  48.           if (var_flavour(this_var->var_name) == VAR_FLAVOUR_SESSION)
  49.           {
  50. +         /* Escapse special characters with a backslash.  Turn a LF and
  51. +          * CR into \n and \r. */
  52.           p = vim_strsave_escaped(get_var_string(this_var),
  53. !                             (char_u *)"\\\"\n\r");
  54. !         if (p == NULL)        /* out of memory */
  55. !             continue;
  56. !         for (t = p; *t != NUL; ++t)
  57. !             if (*t == '\n')
  58. !             *t = 'n';
  59. !             else if (*t == '\r')
  60. !             *t = 'r';
  61.           if ((fprintf(fd, "let %s = %c%s%c",
  62.                   this_var->var_name,
  63.                   (this_var->var_type == VAR_STRING) ? '"' : ' ',
  64. *** ../vim61.052/src/version.c    Sun May  5 14:35:03 2002
  65. --- src/version.c    Sun May  5 19:02:50 2002
  66. ***************
  67. *** 608,609 ****
  68. --- 608,611 ----
  69.   {   /* Add new patch number below this line */
  70. + /**/
  71. +     53,
  72.   /**/
  73.  
  74. -- 
  75. A law to reduce crime states: "It is mandatory for a motorist with criminal
  76. intentions to stop at the city limits and telephone the chief of police as he
  77. is entering the town.
  78.         [real standing law in Washington, United States of America]
  79.  
  80.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  81. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  82. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  83.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  84.