To: [email protected]
Subject: Patch 6.2f.025
Fcc: outbox
From: Bram Moolenaar <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 6.2f.025
Problem:    When reading a file from stdin that has DOS line endings but a
           missing end-of-line for the last line 'fileformat' becomes "unix".
           (Bill McCarthy)
Solution:   Don't add the missing line break when re-reading the text from the
           buffer.
Files:      src/fileio.c


*** ../vim-6.2f.024/src/fileio.c        Mon May 26 23:04:21 2003
--- src/fileio.c        Thu May 29 21:00:53 2003
***************
*** 1109,1114 ****
--- 1109,1118 ----
                               read_buf_col = 0;
                               if (++read_buf_lnum > from)
                               {
+                                   /* When the last line didn't have an
+                                    * end-of-line don't add it now either. */
+                                   if (!curbuf->b_p_eol)
+                                       --tlen;
                                   size = tlen;
                                   break;
                               }
*** ../vim-6.2f.024/src/version.c       Thu May 29 20:40:54 2003
--- src/version.c       Thu May 29 21:05:34 2003
***************
*** 632,633 ****
--- 632,635 ----
 {   /* Add new patch number below this line */
+ /**/
+     25,
 /**/

--
How To Keep A Healthy Level Of Insanity:
1. At lunch time, sit in your parked car with sunglasses on and point
  a hair dryer at passing cars. See if they slow down.

/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
\\\     Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///