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.116 < prev    next >
Encoding:
Internet Message Format  |  2002-06-28  |  4.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.116
  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.116
  11. Problem:    When 'endofline' is changed while 'binary' is set a file should be
  12.         considered modified. (Olaf Buddenhagen)
  13. Solution:   Remember the 'eol' value when editing started and consider the
  14.         file changed when the current value is different and 'binary' is
  15.         set.
  16. Files:        src/option.c, src/structs.h
  17.  
  18.  
  19. *** ../vim61.115/src/option.c    Sun Jun 23 14:34:14 2002
  20. --- src/option.c    Sat Jun 29 16:30:45 2002
  21. ***************
  22. *** 4580,4585 ****
  23. --- 4588,4596 ----
  24.           curbuf->b_p_tx = TRUE;
  25.           else
  26.           curbuf->b_p_tx = FALSE;
  27. + #ifdef FEAT_TITLE
  28. +         need_maketitle = TRUE;
  29. + #endif
  30.       }
  31.       }
  32.   
  33. ***************
  34. *** 5606,5625 ****
  35.       if (!curbuf->b_p_ro && (opt_flags & OPT_LOCAL) == 0)
  36.           readonlymode = FALSE;
  37.   #ifdef FEAT_TITLE
  38. !     maketitle();
  39.   #endif
  40.       }
  41.   
  42.   #ifdef FEAT_TITLE
  43.       /* when 'modifiable' is changed, redraw the window title */
  44.       else if ((int *)varp == &curbuf->b_p_ma)
  45. !     maketitle();
  46.   #endif
  47.   
  48.       /* when 'bin' is set also set some other options */
  49.       else if ((int *)varp == &curbuf->b_p_bin)
  50.       {
  51.       set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
  52.       }
  53.   
  54.   #ifdef FEAT_AUTOCMD
  55. --- 5617,5642 ----
  56.       if (!curbuf->b_p_ro && (opt_flags & OPT_LOCAL) == 0)
  57.           readonlymode = FALSE;
  58.   #ifdef FEAT_TITLE
  59. !     need_maketitle = TRUE;
  60.   #endif
  61.       }
  62.   
  63.   #ifdef FEAT_TITLE
  64.       /* when 'modifiable' is changed, redraw the window title */
  65.       else if ((int *)varp == &curbuf->b_p_ma)
  66. !     need_maketitle = TRUE;
  67. !     /* when 'endofline' is changed, redraw the window title */
  68. !     else if ((int *)varp == &curbuf->b_p_eol)
  69. !     need_maketitle = TRUE;
  70.   #endif
  71.   
  72.       /* when 'bin' is set also set some other options */
  73.       else if ((int *)varp == &curbuf->b_p_bin)
  74.       {
  75.       set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
  76. + #ifdef FEAT_TITLE
  77. +     need_maketitle = TRUE;
  78. + #endif
  79.       }
  80.   
  81.   #ifdef FEAT_AUTOCMD
  82. ***************
  83. *** 5750,5756 ****
  84.       if (!value)
  85.           save_file_ff(curbuf);    /* Buffer is unchanged */
  86.   #ifdef FEAT_TITLE
  87. !     maketitle();
  88.   #endif
  89.   #ifdef FEAT_AUTOCMD
  90.       modified_was_set = value;
  91. --- 5767,5773 ----
  92.       if (!value)
  93.           save_file_ff(curbuf);    /* Buffer is unchanged */
  94.   #ifdef FEAT_TITLE
  95. !     need_maketitle = TRUE;
  96.   #endif
  97.   #ifdef FEAT_AUTOCMD
  98.       modified_was_set = value;
  99. ***************
  100. *** 6132,6138 ****
  101.           p_titlelen = 85;
  102.       }
  103.       if (starting != NO_SCREEN && old_value != p_titlelen)
  104. !         maketitle();
  105.       }
  106.   #endif
  107.   
  108. --- 6149,6155 ----
  109.           p_titlelen = 85;
  110.       }
  111.       if (starting != NO_SCREEN && old_value != p_titlelen)
  112. !         need_maketitle = TRUE;
  113.       }
  114.   #endif
  115.   
  116. ***************
  117. *** 8665,8670 ****
  118. --- 8685,8691 ----
  119.       buf_T    *buf;
  120.   {
  121.       buf->b_start_ffc = *buf->b_p_ff;
  122. +     buf->b_start_eol = buf->b_p_eol;
  123.   #ifdef FEAT_MBYTE
  124.       vim_free(buf->b_start_fenc);
  125.       buf->b_start_fenc = vim_strsave(buf->b_p_fenc);
  126. ***************
  127. *** 8674,8685 ****
  128. --- 8695,8709 ----
  129.   /*
  130.    * Return TRUE if 'fileformat' and/or 'fileencoding' has a different value
  131.    * from when editing started (save_file_ff() called).
  132. +  * Also when 'endofline' was changed and 'binary' is set.
  133.    */
  134.       int
  135.   file_ff_differs(buf)
  136.       buf_T    *buf;
  137.   {
  138.       if (buf->b_start_ffc != *buf->b_p_ff)
  139. +     return TRUE;
  140. +     if (buf->b_p_bin && buf->b_start_eol != buf->b_p_eol)
  141.       return TRUE;
  142.   #ifdef FEAT_MBYTE
  143.       if (buf->b_start_fenc == NULL)
  144. *** ../vim61.115/src/structs.h    Sun May  5 22:51:14 2002
  145. --- src/structs.h    Sat Jun 29 16:08:18 2002
  146. ***************
  147. *** 1005,1010 ****
  148. --- 1011,1017 ----
  149.   
  150.       /* end of buffer options */
  151.   
  152. +     int        b_start_eol;    /* last line had eol when it was read */
  153.       int        b_start_ffc;    /* first char of 'ff' when edit started */
  154.   #ifdef FEAT_MBYTE
  155.       char_u    *b_start_fenc;    /* 'fileencoding' when edit started or NULL */
  156. *** ../vim61.115/src/version.c    Sat Jun 29 15:57:43 2002
  157. --- src/version.c    Sat Jun 29 16:32:19 2002
  158. ***************
  159. *** 608,609 ****
  160. --- 608,611 ----
  161.   {   /* Add new patch number below this line */
  162. + /**/
  163. +     116,
  164.   /**/
  165.  
  166. -- 
  167. ARTHUR:        What?
  168. BLACK KNIGHT:  None shall pass.
  169. ARTHUR:        I have no quarrel with you, good Sir knight, but I must cross
  170.                this bridge.
  171. BLACK KNIGHT:  Then you shall die.
  172.                                   The Quest for the Holy Grail (Monty Python)
  173.  
  174.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  175. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  176. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  177.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  178.