lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
e698dbf
To: vim-dev@vim.org
e698dbf
Subject: Patch 7.2.040
e698dbf
Fcc: outbox
e698dbf
From: Bram Moolenaar <Bram@moolenaar.net>
e698dbf
Mime-Version: 1.0
e698dbf
Content-Type: text/plain; charset=ISO-8859-1
e698dbf
Content-Transfer-Encoding: 8bit
e698dbf
------------
e698dbf
e698dbf
Patch 7.2.040
e698dbf
Problem:    When using ":e ++ff=dos fname" and the file contains a NL without
e698dbf
	    a CR before it and 'ffs' contains "unix" then the fileformat
e698dbf
	    becomes unix.
e698dbf
Solution:   Ignore 'ffs' when using the ++ff argument. (Ben Schmidt)
e698dbf
	    Also remove unreachable code.
e698dbf
Files:	    src/fileio.c
e698dbf
e698dbf
e698dbf
*** ../vim-7.2.039/src/fileio.c	Tue Nov 11 21:55:29 2008
e698dbf
--- src/fileio.c	Wed Nov 12 13:19:42 2008
e698dbf
***************
e698dbf
*** 932,938 ****
e698dbf
--- 932,941 ----
e698dbf
      else
e698dbf
      {
e698dbf
  	if (eap != NULL && eap->force_ff != 0)
e698dbf
+ 	{
e698dbf
  	    fileformat = get_fileformat_force(curbuf, eap);
e698dbf
+ 	    try_unix = try_dos = try_mac = FALSE;
e698dbf
+ 	}
e698dbf
  	else if (curbuf->b_p_bin)
e698dbf
  	    fileformat = EOL_UNIX;		/* binary: use Unix format */
e698dbf
  	else if (*p_ffs == NUL)
e698dbf
***************
e698dbf
*** 2341,2351 ****
e698dbf
  		STRCAT(IObuff, _("[CR missing]"));
e698dbf
  		c = TRUE;
e698dbf
  	    }
e698dbf
- 	    if (ff_error == EOL_MAC)
e698dbf
- 	    {
e698dbf
- 		STRCAT(IObuff, _("[NL found]"));
e698dbf
- 		c = TRUE;
e698dbf
- 	    }
e698dbf
  	    if (split)
e698dbf
  	    {
e698dbf
  		STRCAT(IObuff, _("[long lines split]"));
e698dbf
--- 2344,2349 ----
e698dbf
*** ../vim-7.2.039/src/version.c	Wed Nov 12 15:28:37 2008
e698dbf
--- src/version.c	Wed Nov 12 16:03:44 2008
e698dbf
***************
e698dbf
*** 678,679 ****
e698dbf
--- 678,681 ----
e698dbf
  {   /* Add new patch number below this line */
e698dbf
+ /**/
e698dbf
+     40,
e698dbf
  /**/
e698dbf
e698dbf
-- 
e698dbf
If you're sending someone Styrofoam, what do you pack it in?
e698dbf
e698dbf
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
e698dbf
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
e698dbf
\\\        download, build and distribute -- http://www.A-A-P.org        ///
e698dbf
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///