]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1302 v7.3.1302
authorBram Moolenaar <Bram@vim.org>
Wed, 3 Jul 2013 20:28:36 +0000 (22:28 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 3 Jul 2013 20:28:36 +0000 (22:28 +0200)
Problem:    Test 17 fails on MS-Windows.  Includes line break in file name
            everywhere.
Solution:   Fix 'fileformat'. Omit CR-LF from a line read from an included
            file.

src/search.c
src/testdir/test17.in
src/testdir/test17.ok
src/version.c

index cd4e8fb935353c64efda65297a258c2807757b90..b3ff18fa8b9e54c97f88016ef5d976f4066b803c 100644 (file)
@@ -4825,7 +4825,7 @@ find_pattern_in_path(ptr, dir, len, whole, skip_comments,
            if (inc_opt != NULL && strstr((char *)inc_opt, "\\zs") != NULL)
                /* Use text from '\zs' to '\ze' (or end) of 'include'. */
                new_fname = find_file_name_in_path(incl_regmatch.startp[0],
-                             (int)(incl_regmatch.endp[0] - incl_regmatch.startp[0]),
+                      (int)(incl_regmatch.endp[0] - incl_regmatch.startp[0]),
                                 FNAME_EXP|FNAME_INCL|FNAME_REL, 1L, p_fname);
            else
                /* Use text after match with 'include'. */
@@ -5352,7 +5352,15 @@ exit_matched:
                depth_displayed = depth;
        }
        if (depth >= 0)         /* we could read the line */
+       {
            files[depth].lnum++;
+           /* Remove any CR and LF from the line. */
+           i = (int)STRLEN(line);
+           if (i > 0 && line[i - 1] == '\n')
+               line[--i] = NUL;
+           if (i > 0 && line[i - 1] == '\r')
+               line[--i] = NUL;
+       }
        else if (!already)
        {
            if (++lnum > end_lnum)
index 9bc1d02270900daeef6ad8c10e37502e9441ccb2..bc542c7625c1d9a4e496a9fb9b9f5dc993f758b3 100644 (file)
@@ -33,6 +33,7 @@ STARTTEST
 :"  > nmake -f Make_dos.mak test17.out
 :w! test.out
 gf
+:set ff=unix
 :w! test.out
 :brewind
 ENDTEST
@@ -130,9 +131,10 @@ i%inc    FALSE.c foo.c\e
 :checkpath!
 :redir END
 :brewind
-:" replace "\" to "/" for Windows
+:" change "\" to "/" for Windows and fix 'fileformat'
 :e test.out
 :%s#\\#/#g
+:set ff&
 :w
 :q
 ENDTEST
index 79fef07d0213966095a1764498085fb23b7d1d61..b2a66d5f850ec40e48adc24d1249ac8f57a74a45 100644 (file)
@@ -30,4 +30,4 @@ Xdir1/dir2/foo.c -->
   Xdir1/dir2/bar.c -->
     Xdir1/dir2/baz.c
     Xdir1/dir2/baz.c -->
-      foo.c^@  (Already listed)
+      foo.c  (Already listed)
index 1e9ab93460c8c06f508554e408c25c581b61d622..e84ea523029898a9c209caec83d7955eb9b734ba 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1302,
 /**/
     1301,
 /**/