mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
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.
This commit is contained in:
parent
ee0ee2a046
commit
c84e3c1ee1
10
src/search.c
10
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)
|
if (inc_opt != NULL && strstr((char *)inc_opt, "\\zs") != NULL)
|
||||||
/* Use text from '\zs' to '\ze' (or end) of 'include'. */
|
/* Use text from '\zs' to '\ze' (or end) of 'include'. */
|
||||||
new_fname = find_file_name_in_path(incl_regmatch.startp[0],
|
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);
|
FNAME_EXP|FNAME_INCL|FNAME_REL, 1L, p_fname);
|
||||||
else
|
else
|
||||||
/* Use text after match with 'include'. */
|
/* Use text after match with 'include'. */
|
||||||
@ -5352,7 +5352,15 @@ exit_matched:
|
|||||||
depth_displayed = depth;
|
depth_displayed = depth;
|
||||||
}
|
}
|
||||||
if (depth >= 0) /* we could read the line */
|
if (depth >= 0) /* we could read the line */
|
||||||
|
{
|
||||||
files[depth].lnum++;
|
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)
|
else if (!already)
|
||||||
{
|
{
|
||||||
if (++lnum > end_lnum)
|
if (++lnum > end_lnum)
|
||||||
|
@ -33,6 +33,7 @@ STARTTEST
|
|||||||
:" > nmake -f Make_dos.mak test17.out
|
:" > nmake -f Make_dos.mak test17.out
|
||||||
:w! test.out
|
:w! test.out
|
||||||
gf
|
gf
|
||||||
|
:set ff=unix
|
||||||
:w! test.out
|
:w! test.out
|
||||||
:brewind
|
:brewind
|
||||||
ENDTEST
|
ENDTEST
|
||||||
@ -130,9 +131,10 @@ i%inc FALSE.c foo.c
|
|||||||
:checkpath!
|
:checkpath!
|
||||||
:redir END
|
:redir END
|
||||||
:brewind
|
:brewind
|
||||||
:" replace "\" to "/" for Windows
|
:" change "\" to "/" for Windows and fix 'fileformat'
|
||||||
:e test.out
|
:e test.out
|
||||||
:%s#\\#/#g
|
:%s#\\#/#g
|
||||||
|
:set ff&
|
||||||
:w
|
:w
|
||||||
:q
|
:q
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
@ -30,4 +30,4 @@ Xdir1/dir2/foo.c -->
|
|||||||
Xdir1/dir2/bar.c -->
|
Xdir1/dir2/bar.c -->
|
||||||
Xdir1/dir2/baz.c
|
Xdir1/dir2/baz.c
|
||||||
Xdir1/dir2/baz.c -->
|
Xdir1/dir2/baz.c -->
|
||||||
foo.c^@ (Already listed)
|
foo.c (Already listed)
|
||||||
|
@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1302,
|
||||||
/**/
|
/**/
|
||||||
1301,
|
1301,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user