Karsten Hopp 7d42f7
To: vim_dev@googlegroups.com
Karsten Hopp 7d42f7
Subject: Patch 7.3.1302
Karsten Hopp 7d42f7
Fcc: outbox
Karsten Hopp 7d42f7
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 7d42f7
Mime-Version: 1.0
Karsten Hopp 7d42f7
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 7d42f7
Content-Transfer-Encoding: 8bit
Karsten Hopp 7d42f7
------------
Karsten Hopp 7d42f7
Karsten Hopp 7d42f7
Patch 7.3.1302
Karsten Hopp 7d42f7
Problem:    Test 17 fails on MS-Windows.  Includes line break in file name
Karsten Hopp 7d42f7
	    everywhere.
Karsten Hopp 7d42f7
Solution:   Fix 'fileformat'. Omit CR-LF from a line read from an included
Karsten Hopp 7d42f7
	    file.
Karsten Hopp 7d42f7
Files:	    src/search.c, src/testdir/test17.in, src/testdir/test17.ok
Karsten Hopp 7d42f7
Karsten Hopp 7d42f7
Karsten Hopp 7d42f7
*** ../vim-7.3.1301/src/search.c	2013-06-30 14:46:50.000000000 +0200
Karsten Hopp 7d42f7
--- src/search.c	2013-07-03 22:18:52.000000000 +0200
Karsten Hopp 7d42f7
***************
Karsten Hopp 7d42f7
*** 4825,4831 ****
Karsten Hopp 7d42f7
  	    if (inc_opt != NULL && strstr((char *)inc_opt, "\\zs") != NULL)
Karsten Hopp 7d42f7
  		/* Use text from '\zs' to '\ze' (or end) of 'include'. */
Karsten Hopp 7d42f7
  		new_fname = find_file_name_in_path(incl_regmatch.startp[0],
Karsten Hopp 7d42f7
! 			      (int)(incl_regmatch.endp[0] - incl_regmatch.startp[0]),
Karsten Hopp 7d42f7
  				 FNAME_EXP|FNAME_INCL|FNAME_REL, 1L, p_fname);
Karsten Hopp 7d42f7
  	    else
Karsten Hopp 7d42f7
  		/* Use text after match with 'include'. */
Karsten Hopp 7d42f7
--- 4825,4831 ----
Karsten Hopp 7d42f7
  	    if (inc_opt != NULL && strstr((char *)inc_opt, "\\zs") != NULL)
Karsten Hopp 7d42f7
  		/* Use text from '\zs' to '\ze' (or end) of 'include'. */
Karsten Hopp 7d42f7
  		new_fname = find_file_name_in_path(incl_regmatch.startp[0],
Karsten Hopp 7d42f7
! 		       (int)(incl_regmatch.endp[0] - incl_regmatch.startp[0]),
Karsten Hopp 7d42f7
  				 FNAME_EXP|FNAME_INCL|FNAME_REL, 1L, p_fname);
Karsten Hopp 7d42f7
  	    else
Karsten Hopp 7d42f7
  		/* Use text after match with 'include'. */
Karsten Hopp 7d42f7
***************
Karsten Hopp 7d42f7
*** 5352,5358 ****
Karsten Hopp 7d42f7
--- 5352,5366 ----
Karsten Hopp 7d42f7
  		depth_displayed = depth;
Karsten Hopp 7d42f7
  	}
Karsten Hopp 7d42f7
  	if (depth >= 0)		/* we could read the line */
Karsten Hopp 7d42f7
+ 	{
Karsten Hopp 7d42f7
  	    files[depth].lnum++;
Karsten Hopp 7d42f7
+ 	    /* Remove any CR and LF from the line. */
Karsten Hopp 7d42f7
+ 	    i = (int)STRLEN(line);
Karsten Hopp 7d42f7
+ 	    if (i > 0 && line[i - 1] == '\n')
Karsten Hopp 7d42f7
+ 		line[--i] = NUL;
Karsten Hopp 7d42f7
+ 	    if (i > 0 && line[i - 1] == '\r')
Karsten Hopp 7d42f7
+ 		line[--i] = NUL;
Karsten Hopp 7d42f7
+ 	}
Karsten Hopp 7d42f7
  	else if (!already)
Karsten Hopp 7d42f7
  	{
Karsten Hopp 7d42f7
  	    if (++lnum > end_lnum)
Karsten Hopp 7d42f7
*** ../vim-7.3.1301/src/testdir/test17.in	2013-06-19 21:17:26.000000000 +0200
Karsten Hopp 7d42f7
--- src/testdir/test17.in	2013-07-03 22:28:23.000000000 +0200
Karsten Hopp 7d42f7
***************
Karsten Hopp 7d42f7
*** 33,38 ****
Karsten Hopp 7d42f7
--- 33,39 ----
Karsten Hopp 7d42f7
  :"  > nmake -f Make_dos.mak test17.out
Karsten Hopp 7d42f7
  :w! test.out
Karsten Hopp 7d42f7
  gf
Karsten Hopp 7d42f7
+ :set ff=unix
Karsten Hopp 7d42f7
  :w! test.out
Karsten Hopp 7d42f7
  :brewind
Karsten Hopp 7d42f7
  ENDTEST
Karsten Hopp 7d42f7
***************
Karsten Hopp 7d42f7
*** 130,138 ****
Karsten Hopp 7d42f7
  :checkpath!
Karsten Hopp 7d42f7
  :redir END
Karsten Hopp 7d42f7
  :brewind
Karsten Hopp 7d42f7
! :" replace "\" to "/" for Windows
Karsten Hopp 7d42f7
  :e test.out
Karsten Hopp 7d42f7
  :%s#\\#/#g
Karsten Hopp 7d42f7
  :w
Karsten Hopp 7d42f7
  :q
Karsten Hopp 7d42f7
  ENDTEST
Karsten Hopp 7d42f7
--- 131,140 ----
Karsten Hopp 7d42f7
  :checkpath!
Karsten Hopp 7d42f7
  :redir END
Karsten Hopp 7d42f7
  :brewind
Karsten Hopp 7d42f7
! :" change "\" to "/" for Windows and fix 'fileformat'
Karsten Hopp 7d42f7
  :e test.out
Karsten Hopp 7d42f7
  :%s#\\#/#g
Karsten Hopp 7d42f7
+ :set ff&
Karsten Hopp 7d42f7
  :w
Karsten Hopp 7d42f7
  :q
Karsten Hopp 7d42f7
  ENDTEST
Karsten Hopp 7d42f7
*** ../vim-7.3.1301/src/testdir/test17.ok	2012-07-25 13:46:25.000000000 +0200
Karsten Hopp 7d42f7
--- src/testdir/test17.ok	2013-07-03 22:19:18.000000000 +0200
Karsten Hopp 7d42f7
***************
Karsten Hopp 7d42f7
*** 30,33 ****
Karsten Hopp 7d42f7
    Xdir1/dir2/bar.c -->
Karsten Hopp 7d42f7
      Xdir1/dir2/baz.c
Karsten Hopp 7d42f7
      Xdir1/dir2/baz.c -->
Karsten Hopp 7d42f7
!       foo.c^@  (Already listed)
Karsten Hopp 7d42f7
--- 30,33 ----
Karsten Hopp 7d42f7
    Xdir1/dir2/bar.c -->
Karsten Hopp 7d42f7
      Xdir1/dir2/baz.c
Karsten Hopp 7d42f7
      Xdir1/dir2/baz.c -->
Karsten Hopp 7d42f7
!       foo.c  (Already listed)
Karsten Hopp 7d42f7
*** ../vim-7.3.1301/src/version.c	2013-07-03 21:19:00.000000000 +0200
Karsten Hopp 7d42f7
--- src/version.c	2013-07-03 22:20:30.000000000 +0200
Karsten Hopp 7d42f7
***************
Karsten Hopp 7d42f7
*** 730,731 ****
Karsten Hopp 7d42f7
--- 730,733 ----
Karsten Hopp 7d42f7
  {   /* Add new patch number below this line */
Karsten Hopp 7d42f7
+ /**/
Karsten Hopp 7d42f7
+     1302,
Karsten Hopp 7d42f7
  /**/
Karsten Hopp 7d42f7
Karsten Hopp 7d42f7
-- 
Karsten Hopp 7d42f7
       [Autumn changed into Winter ... Winter changed into Spring ...  Spring
Karsten Hopp 7d42f7
       changed back into Autumn and Autumn gave Winter and Spring a miss and
Karsten Hopp 7d42f7
       went straight on into Summer ...  Until one day ...]
Karsten Hopp 7d42f7
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 7d42f7
Karsten Hopp 7d42f7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 7d42f7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 7d42f7
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 7d42f7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///