summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-03 22:28:36 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-03 22:28:36 +0200
commitc84e3c1ee1cc3bc79dc5c313df593670528ac395 (patch)
tree0aadde6012b802e2ebecc0f82c320e9c43933c98 /src
parentee0ee2a04638c6b511c909197ba597d329c6f3e0 (diff)
downloadvim-c84e3c1ee1cc3bc79dc5c313df593670528ac395.zip
updated for version 7.3.1302
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.
Diffstat (limited to 'src')
-rw-r--r--src/search.c10
-rw-r--r--src/testdir/test17.in4
-rw-r--r--src/testdir/test17.ok2
-rw-r--r--src/version.c2
4 files changed, 15 insertions, 3 deletions
diff --git a/src/search.c b/src/search.c
index cd4e8fb93..b3ff18fa8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -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)
diff --git a/src/testdir/test17.in b/src/testdir/test17.in
index 9bc1d0227..bc542c762 100644
--- a/src/testdir/test17.in
+++ b/src/testdir/test17.in
@@ -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
: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
diff --git a/src/testdir/test17.ok b/src/testdir/test17.ok
index 79fef07d0..b2a66d5f8 100644
--- a/src/testdir/test17.ok
+++ b/src/testdir/test17.ok
@@ -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)
diff --git a/src/version.c b/src/version.c
index 1e9ab9346..e84ea5230 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1302,
+/**/
1301,
/**/
1300,