|
Karsten Hopp |
30914c |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
30914c |
Subject: Patch 7.3.872
|
|
Karsten Hopp |
30914c |
Fcc: outbox
|
|
Karsten Hopp |
30914c |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
30914c |
Mime-Version: 1.0
|
|
Karsten Hopp |
30914c |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
30914c |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
30914c |
------------
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
Patch 7.3.872
|
|
Karsten Hopp |
30914c |
Problem: On some systems case of file names is always ignored, on others
|
|
Karsten Hopp |
30914c |
never.
|
|
Karsten Hopp |
30914c |
Solution: Add the 'fileignorecase' option to control this at runtime.
|
|
Karsten Hopp |
30914c |
Implies 'wildignorecase'.
|
|
Karsten Hopp |
30914c |
Files: src/buffer.c, src/edit.c, src/ex_cmds2.c, src/ex_getln.c,
|
|
Karsten Hopp |
30914c |
src/fileio.c, src/misc1.c, src/misc2.c, src/option.c,
|
|
Karsten Hopp |
30914c |
src/option.h, src/vim.h, runtime/doc/options.txt
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/buffer.c 2013-03-19 14:25:50.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/buffer.c 2013-03-19 16:03:42.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 2401,2412 ****
|
|
Karsten Hopp |
30914c |
if (name != NULL)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
regmatch.regprog = prog;
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = TRUE; /* Always ignore case */
|
|
Karsten Hopp |
30914c |
! #else
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = FALSE; /* Never ignore case */
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
!
|
|
Karsten Hopp |
30914c |
if (vim_regexec(®match, name, (colnr_T)0))
|
|
Karsten Hopp |
30914c |
match = name;
|
|
Karsten Hopp |
30914c |
else
|
|
Karsten Hopp |
30914c |
--- 2401,2407 ----
|
|
Karsten Hopp |
30914c |
if (name != NULL)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
regmatch.regprog = prog;
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = p_fic; /* ignore case when 'fileignorecase' is set */
|
|
Karsten Hopp |
30914c |
if (vim_regexec(®match, name, (colnr_T)0))
|
|
Karsten Hopp |
30914c |
match = name;
|
|
Karsten Hopp |
30914c |
else
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/edit.c 2013-03-19 13:33:18.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/edit.c 2013-03-19 15:43:19.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 4336,4348 ****
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/* May change home directory back to "~". */
|
|
Karsten Hopp |
30914c |
tilde_replace(compl_pattern, num_matches, matches);
|
|
Karsten Hopp |
30914c |
! ins_compl_add_matches(num_matches, matches,
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! TRUE
|
|
Karsten Hopp |
30914c |
! #else
|
|
Karsten Hopp |
30914c |
! FALSE
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
! );
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
--- 4336,4342 ----
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/* May change home directory back to "~". */
|
|
Karsten Hopp |
30914c |
tilde_replace(compl_pattern, num_matches, matches);
|
|
Karsten Hopp |
30914c |
! ins_compl_add_matches(num_matches, matches, p_fic || p_wic);
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/ex_cmds2.c 2012-10-03 18:24:55.000000000 +0200
|
|
Karsten Hopp |
30914c |
--- src/ex_cmds2.c 2013-03-19 16:03:50.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 1926,1936 ****
|
|
Karsten Hopp |
30914c |
* Delete the items: use each item as a regexp and find a match in the
|
|
Karsten Hopp |
30914c |
* argument list.
|
|
Karsten Hopp |
30914c |
*/
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = TRUE; /* Always ignore case */
|
|
Karsten Hopp |
30914c |
! #else
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = FALSE; /* Never ignore case */
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
for (i = 0; i < new_ga.ga_len && !got_int; ++i)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
p = ((char_u **)new_ga.ga_data)[i];
|
|
Karsten Hopp |
30914c |
--- 1926,1932 ----
|
|
Karsten Hopp |
30914c |
* Delete the items: use each item as a regexp and find a match in the
|
|
Karsten Hopp |
30914c |
* argument list.
|
|
Karsten Hopp |
30914c |
*/
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = p_fic; /* ignore case when 'fileignorecase' is set */
|
|
Karsten Hopp |
30914c |
for (i = 0; i < new_ga.ga_len && !got_int; ++i)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
p = ((char_u **)new_ga.ga_data)[i];
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/ex_getln.c 2012-11-28 16:49:53.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/ex_getln.c 2013-03-19 16:03:53.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 3653,3671 ****
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
for (i = 0; i < xp->xp_numfiles; ++i)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! if (xp->xp_context == EXPAND_DIRECTORIES
|
|
Karsten Hopp |
30914c |
|| xp->xp_context == EXPAND_FILES
|
|
Karsten Hopp |
30914c |
|| xp->xp_context == EXPAND_SHELLCMD
|
|
Karsten Hopp |
30914c |
! || xp->xp_context == EXPAND_BUFFERS)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
if (TOLOWER_LOC(xp->xp_files[i][len]) !=
|
|
Karsten Hopp |
30914c |
TOLOWER_LOC(xp->xp_files[0][len]))
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
! else
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
! if (xp->xp_files[i][len] != xp->xp_files[0][len])
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
if (i < xp->xp_numfiles)
|
|
Karsten Hopp |
30914c |
--- 3653,3668 ----
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
for (i = 0; i < xp->xp_numfiles; ++i)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
! if (p_fic && (xp->xp_context == EXPAND_DIRECTORIES
|
|
Karsten Hopp |
30914c |
|| xp->xp_context == EXPAND_FILES
|
|
Karsten Hopp |
30914c |
|| xp->xp_context == EXPAND_SHELLCMD
|
|
Karsten Hopp |
30914c |
! || xp->xp_context == EXPAND_BUFFERS))
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
if (TOLOWER_LOC(xp->xp_files[i][len]) !=
|
|
Karsten Hopp |
30914c |
TOLOWER_LOC(xp->xp_files[0][len]))
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
! else if (xp->xp_files[i][len] != xp->xp_files[0][len])
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
if (i < xp->xp_numfiles)
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/fileio.c 2013-03-19 13:33:18.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/fileio.c 2013-03-19 15:49:28.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 6485,6493 ****
|
|
Karsten Hopp |
30914c |
#ifdef HAVE_ACL
|
|
Karsten Hopp |
30914c |
vim_acl_T acl; /* ACL from original file */
|
|
Karsten Hopp |
30914c |
#endif
|
|
Karsten Hopp |
30914c |
- #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME)
|
|
Karsten Hopp |
30914c |
int use_tmp_file = FALSE;
|
|
Karsten Hopp |
30914c |
- #endif
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/*
|
|
Karsten Hopp |
30914c |
* When the names are identical, there is nothing to do. When they refer
|
|
Karsten Hopp |
30914c |
--- 6485,6491 ----
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 6496,6506 ****
|
|
Karsten Hopp |
30914c |
*/
|
|
Karsten Hopp |
30914c |
if (fnamecmp(from, to) == 0)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! if (STRCMP(gettail(from), gettail(to)) != 0)
|
|
Karsten Hopp |
30914c |
use_tmp_file = TRUE;
|
|
Karsten Hopp |
30914c |
else
|
|
Karsten Hopp |
30914c |
- #endif
|
|
Karsten Hopp |
30914c |
return 0;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
--- 6494,6502 ----
|
|
Karsten Hopp |
30914c |
*/
|
|
Karsten Hopp |
30914c |
if (fnamecmp(from, to) == 0)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
! if (p_fic && STRCMP(gettail(from), gettail(to)) != 0)
|
|
Karsten Hopp |
30914c |
use_tmp_file = TRUE;
|
|
Karsten Hopp |
30914c |
else
|
|
Karsten Hopp |
30914c |
return 0;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 6539,6545 ****
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
#endif
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
- #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME)
|
|
Karsten Hopp |
30914c |
if (use_tmp_file)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
char tempname[MAXPATHL + 1];
|
|
Karsten Hopp |
30914c |
--- 6535,6540 ----
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 6572,6578 ****
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
return -1;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
- #endif
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/*
|
|
Karsten Hopp |
30914c |
* Delete the "to" file, this is required on some systems to make the
|
|
Karsten Hopp |
30914c |
--- 6567,6572 ----
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 10007,10017 ****
|
|
Karsten Hopp |
30914c |
int match = FALSE;
|
|
Karsten Hopp |
30914c |
#endif
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = TRUE; /* Always ignore case */
|
|
Karsten Hopp |
30914c |
! #else
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = FALSE; /* Don't ever ignore case */
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
#ifdef FEAT_OSFILETYPE
|
|
Karsten Hopp |
30914c |
if (*pattern == '<')
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
--- 10001,10007 ----
|
|
Karsten Hopp |
30914c |
int match = FALSE;
|
|
Karsten Hopp |
30914c |
#endif
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = p_fic; /* ignore case if 'fileignorecase' is set */
|
|
Karsten Hopp |
30914c |
#ifdef FEAT_OSFILETYPE
|
|
Karsten Hopp |
30914c |
if (*pattern == '<')
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/misc1.c 2013-03-16 21:35:28.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/misc1.c 2013-03-19 16:16:24.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 5026,5041 ****
|
|
Karsten Hopp |
30914c |
return retval;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
- #if (defined(CASE_INSENSITIVE_FILENAME) && defined(BACKSLASH_IN_FILENAME)) \
|
|
Karsten Hopp |
30914c |
- || defined(PROTO)
|
|
Karsten Hopp |
30914c |
/*
|
|
Karsten Hopp |
30914c |
! * Versions of fnamecmp() and fnamencmp() that handle '/' and '\' equally.
|
|
Karsten Hopp |
30914c |
*/
|
|
Karsten Hopp |
30914c |
int
|
|
Karsten Hopp |
30914c |
vim_fnamecmp(x, y)
|
|
Karsten Hopp |
30914c |
char_u *x, *y;
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
return vim_fnamencmp(x, y, MAXPATHL);
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
int
|
|
Karsten Hopp |
30914c |
--- 5026,5046 ----
|
|
Karsten Hopp |
30914c |
return retval;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/*
|
|
Karsten Hopp |
30914c |
! * Versions of fnamecmp() and fnamencmp() that handle '/' and '\' equally
|
|
Karsten Hopp |
30914c |
! * and deal with 'fileignorecase'.
|
|
Karsten Hopp |
30914c |
*/
|
|
Karsten Hopp |
30914c |
int
|
|
Karsten Hopp |
30914c |
vim_fnamecmp(x, y)
|
|
Karsten Hopp |
30914c |
char_u *x, *y;
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
+ #ifdef BACKSLASH_IN_FILENAME
|
|
Karsten Hopp |
30914c |
return vim_fnamencmp(x, y, MAXPATHL);
|
|
Karsten Hopp |
30914c |
+ #else
|
|
Karsten Hopp |
30914c |
+ if (p_fic)
|
|
Karsten Hopp |
30914c |
+ return MB_STRICMP(x, y);
|
|
Karsten Hopp |
30914c |
+ return STRCMP(x, y);
|
|
Karsten Hopp |
30914c |
+ #endif
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
int
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 5043,5051 ****
|
|
Karsten Hopp |
30914c |
char_u *x, *y;
|
|
Karsten Hopp |
30914c |
size_t len;
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
while (len > 0 && *x && *y)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
! if (TOLOWER_LOC(*x) != TOLOWER_LOC(*y)
|
|
Karsten Hopp |
30914c |
&& !(*x == '/' && *y == '\\')
|
|
Karsten Hopp |
30914c |
&& !(*x == '\\' && *y == '/'))
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
--- 5048,5058 ----
|
|
Karsten Hopp |
30914c |
char_u *x, *y;
|
|
Karsten Hopp |
30914c |
size_t len;
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
+ #ifdef BACKSLASH_IN_FILENAME
|
|
Karsten Hopp |
30914c |
+ /* TODO: multi-byte characters. */
|
|
Karsten Hopp |
30914c |
while (len > 0 && *x && *y)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
! if ((p_fic ? TOLOWER_LOC(*x) != TOLOWER_LOC(*y) : *x != *y)
|
|
Karsten Hopp |
30914c |
&& !(*x == '/' && *y == '\\')
|
|
Karsten Hopp |
30914c |
&& !(*x == '\\' && *y == '/'))
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 5056,5063 ****
|
|
Karsten Hopp |
30914c |
if (len == 0)
|
|
Karsten Hopp |
30914c |
return 0;
|
|
Karsten Hopp |
30914c |
return (*x - *y);
|
|
Karsten Hopp |
30914c |
! }
|
|
Karsten Hopp |
30914c |
#endif
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/*
|
|
Karsten Hopp |
30914c |
* Concatenate file names fname1 and fname2 into allocated memory.
|
|
Karsten Hopp |
30914c |
--- 5063,5074 ----
|
|
Karsten Hopp |
30914c |
if (len == 0)
|
|
Karsten Hopp |
30914c |
return 0;
|
|
Karsten Hopp |
30914c |
return (*x - *y);
|
|
Karsten Hopp |
30914c |
! #else
|
|
Karsten Hopp |
30914c |
! if (p_fic)
|
|
Karsten Hopp |
30914c |
! return MB_STRNICMP(x, y, len);
|
|
Karsten Hopp |
30914c |
! return STRNCMP(x, y, len);
|
|
Karsten Hopp |
30914c |
#endif
|
|
Karsten Hopp |
30914c |
+ }
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/*
|
|
Karsten Hopp |
30914c |
* Concatenate file names fname1 and fname2 into allocated memory.
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 9835,9845 ****
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
else if (path_end >= path + wildoff
|
|
Karsten Hopp |
30914c |
&& (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL
|
|
Karsten Hopp |
30914c |
! #ifndef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! || ((flags & EW_ICASE)
|
|
Karsten Hopp |
30914c |
! && isalpha(PTR2CHAR(path_end)))
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
! ))
|
|
Karsten Hopp |
30914c |
e = p;
|
|
Karsten Hopp |
30914c |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
30914c |
if (has_mbyte)
|
|
Karsten Hopp |
30914c |
--- 9846,9853 ----
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
else if (path_end >= path + wildoff
|
|
Karsten Hopp |
30914c |
&& (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL
|
|
Karsten Hopp |
30914c |
! || (!p_fic && (flags & EW_ICASE)
|
|
Karsten Hopp |
30914c |
! && isalpha(PTR2CHAR(path_end)))))
|
|
Karsten Hopp |
30914c |
e = p;
|
|
Karsten Hopp |
30914c |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
30914c |
if (has_mbyte)
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 9882,9895 ****
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/* compile the regexp into a program */
|
|
Karsten Hopp |
30914c |
- #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
- regmatch.rm_ic = TRUE; /* Behave like Terminal.app */
|
|
Karsten Hopp |
30914c |
- #else
|
|
Karsten Hopp |
30914c |
if (flags & EW_ICASE)
|
|
Karsten Hopp |
30914c |
regmatch.rm_ic = TRUE; /* 'wildignorecase' set */
|
|
Karsten Hopp |
30914c |
else
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = FALSE; /* Don't ignore case */
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
if (flags & (EW_NOERROR | EW_NOTWILD))
|
|
Karsten Hopp |
30914c |
++emsg_silent;
|
|
Karsten Hopp |
30914c |
regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
|
|
Karsten Hopp |
30914c |
--- 9890,9899 ----
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/* compile the regexp into a program */
|
|
Karsten Hopp |
30914c |
if (flags & EW_ICASE)
|
|
Karsten Hopp |
30914c |
regmatch.rm_ic = TRUE; /* 'wildignorecase' set */
|
|
Karsten Hopp |
30914c |
else
|
|
Karsten Hopp |
30914c |
! regmatch.rm_ic = p_fic; /* ignore case when 'fileignorecase' is set */
|
|
Karsten Hopp |
30914c |
if (flags & (EW_NOERROR | EW_NOTWILD))
|
|
Karsten Hopp |
30914c |
++emsg_silent;
|
|
Karsten Hopp |
30914c |
regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/misc2.c 2012-11-28 18:31:49.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/misc2.c 2013-03-19 16:39:56.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 5362,5374 ****
|
|
Karsten Hopp |
30914c |
if (STRLEN(s1) != STRLEN(s2))
|
|
Karsten Hopp |
30914c |
return FAIL;
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
for (i = 0; s1[i] != NUL && s2[i] != NUL; i++)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
if (s1[i] != s2[i]
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! && TOUPPER_LOC(s1[i]) != TOUPPER_LOC(s2[i])
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
! )
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
if (i >= 2)
|
|
Karsten Hopp |
30914c |
if (s1[i-1] == '*' && s1[i-2] == '*')
|
|
Karsten Hopp |
30914c |
--- 5362,5372 ----
|
|
Karsten Hopp |
30914c |
if (STRLEN(s1) != STRLEN(s2))
|
|
Karsten Hopp |
30914c |
return FAIL;
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
+ /* TODO: handle multi-byte characters. */
|
|
Karsten Hopp |
30914c |
for (i = 0; s1[i] != NUL && s2[i] != NUL; i++)
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
if (s1[i] != s2[i]
|
|
Karsten Hopp |
30914c |
! && (!p_fic || TOUPPER_LOC(s1[i]) != TOUPPER_LOC(s2[i])))
|
|
Karsten Hopp |
30914c |
{
|
|
Karsten Hopp |
30914c |
if (i >= 2)
|
|
Karsten Hopp |
30914c |
if (s1[i-1] == '*' && s1[i-2] == '*')
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 6123,6134 ****
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
! if (
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! TOUPPER_LOC(p[i]) != TOUPPER_LOC(q[i])
|
|
Karsten Hopp |
30914c |
! #else
|
|
Karsten Hopp |
30914c |
! p[i] != q[i]
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
#ifdef BACKSLASH_IN_FILENAME
|
|
Karsten Hopp |
30914c |
/* consider '/' and '\\' to be equal */
|
|
Karsten Hopp |
30914c |
&& !((p[i] == '/' && q[i] == '\\')
|
|
Karsten Hopp |
30914c |
--- 6121,6127 ----
|
|
Karsten Hopp |
30914c |
break;
|
|
Karsten Hopp |
30914c |
}
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
! if ((p_fic ? TOUPPER_LOC(p[i]) != TOUPPER_LOC(q[i]) : p[i] != q[i])
|
|
Karsten Hopp |
30914c |
#ifdef BACKSLASH_IN_FILENAME
|
|
Karsten Hopp |
30914c |
/* consider '/' and '\\' to be equal */
|
|
Karsten Hopp |
30914c |
&& !((p[i] == '/' && q[i] == '\\')
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/option.c 2013-03-13 20:42:28.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/option.c 2013-03-19 15:40:25.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 1108,1113 ****
|
|
Karsten Hopp |
30914c |
--- 1108,1122 ----
|
|
Karsten Hopp |
30914c |
(char_u *)&p_ffs, PV_NONE,
|
|
Karsten Hopp |
30914c |
{(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM}
|
|
Karsten Hopp |
30914c |
SCRIPTID_INIT},
|
|
Karsten Hopp |
30914c |
+ {"fileignorecase", "fic", P_BOOL|P_VI_DEF,
|
|
Karsten Hopp |
30914c |
+ (char_u *)&p_fic, PV_NONE,
|
|
Karsten Hopp |
30914c |
+ {
|
|
Karsten Hopp |
30914c |
+ #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
+ (char_u *)TRUE,
|
|
Karsten Hopp |
30914c |
+ #else
|
|
Karsten Hopp |
30914c |
+ (char_u *)FALSE,
|
|
Karsten Hopp |
30914c |
+ #endif
|
|
Karsten Hopp |
30914c |
+ (char_u *)0L} SCRIPTID_INIT},
|
|
Karsten Hopp |
30914c |
{"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME,
|
|
Karsten Hopp |
30914c |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
30914c |
(char_u *)&p_ft, PV_FT,
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/option.h 2012-08-15 16:20:59.000000000 +0200
|
|
Karsten Hopp |
30914c |
--- src/option.h 2013-03-19 15:42:24.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 453,458 ****
|
|
Karsten Hopp |
30914c |
--- 453,459 ----
|
|
Karsten Hopp |
30914c |
EXTERN char_u *p_fencs; /* 'fileencodings' */
|
|
Karsten Hopp |
30914c |
#endif
|
|
Karsten Hopp |
30914c |
EXTERN char_u *p_ffs; /* 'fileformats' */
|
|
Karsten Hopp |
30914c |
+ EXTERN long p_fic; /* 'fileignorecase' */
|
|
Karsten Hopp |
30914c |
#ifdef FEAT_FOLDING
|
|
Karsten Hopp |
30914c |
EXTERN char_u *p_fcl; /* 'foldclose' */
|
|
Karsten Hopp |
30914c |
EXTERN long p_fdls; /* 'foldlevelstart' */
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/vim.h 2013-03-19 13:33:18.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/vim.h 2013-03-19 16:14:29.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 1627,1644 ****
|
|
Karsten Hopp |
30914c |
* (this does not account for maximum name lengths and things like "../dir",
|
|
Karsten Hopp |
30914c |
* thus it is not 100% accurate!)
|
|
Karsten Hopp |
30914c |
*/
|
|
Karsten Hopp |
30914c |
! #ifdef CASE_INSENSITIVE_FILENAME
|
|
Karsten Hopp |
30914c |
! # ifdef BACKSLASH_IN_FILENAME
|
|
Karsten Hopp |
30914c |
! # define fnamecmp(x, y) vim_fnamecmp((x), (y))
|
|
Karsten Hopp |
30914c |
! # define fnamencmp(x, y, n) vim_fnamencmp((x), (y), (size_t)(n))
|
|
Karsten Hopp |
30914c |
! # else
|
|
Karsten Hopp |
30914c |
! # define fnamecmp(x, y) MB_STRICMP((x), (y))
|
|
Karsten Hopp |
30914c |
! # define fnamencmp(x, y, n) MB_STRNICMP((x), (y), (n))
|
|
Karsten Hopp |
30914c |
! # endif
|
|
Karsten Hopp |
30914c |
! #else
|
|
Karsten Hopp |
30914c |
! # define fnamecmp(x, y) strcmp((char *)(x), (char *)(y))
|
|
Karsten Hopp |
30914c |
! # define fnamencmp(x, y, n) strncmp((char *)(x), (char *)(y), (size_t)(n))
|
|
Karsten Hopp |
30914c |
! #endif
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
#ifdef HAVE_MEMSET
|
|
Karsten Hopp |
30914c |
# define vim_memset(ptr, c, size) memset((ptr), (c), (size))
|
|
Karsten Hopp |
30914c |
--- 1627,1634 ----
|
|
Karsten Hopp |
30914c |
* (this does not account for maximum name lengths and things like "../dir",
|
|
Karsten Hopp |
30914c |
* thus it is not 100% accurate!)
|
|
Karsten Hopp |
30914c |
*/
|
|
Karsten Hopp |
30914c |
! #define fnamecmp(x, y) vim_fnamecmp((char_u *)(x), (char_u *)(y))
|
|
Karsten Hopp |
30914c |
! #define fnamencmp(x, y, n) vim_fnamencmp((char_u *)(x), (char_u *)(y), (size_t)(n))
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
#ifdef HAVE_MEMSET
|
|
Karsten Hopp |
30914c |
# define vim_memset(ptr, c, size) memset((ptr), (c), (size))
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/runtime/doc/options.txt 2013-01-23 18:37:31.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- runtime/doc/options.txt 2013-03-19 16:25:49.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 2895,2900 ****
|
|
Karsten Hopp |
30914c |
--- 2941,2954 ----
|
|
Karsten Hopp |
30914c |
NOTE: This option is set to the Vi default value when 'compatible' is
|
|
Karsten Hopp |
30914c |
set and to the Vim default value when 'compatible' is reset.
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
+ *'fileignorecase'* *'wic'* *'nofileignorecase'* *'nowic'*
|
|
Karsten Hopp |
30914c |
+ 'fileignorecase' 'wic' boolean (default on for systems where case in file
|
|
Karsten Hopp |
30914c |
+ names is normally ignored.
|
|
Karsten Hopp |
30914c |
+ global
|
|
Karsten Hopp |
30914c |
+ {not in Vi}
|
|
Karsten Hopp |
30914c |
+ When set case is ignored when using file names and directories.
|
|
Karsten Hopp |
30914c |
+ See 'wildignorecase' for only ignoring case when doing completion.
|
|
Karsten Hopp |
30914c |
+
|
|
Karsten Hopp |
30914c |
*'filetype'* *'ft'*
|
|
Karsten Hopp |
30914c |
'filetype' 'ft' string (default: "")
|
|
Karsten Hopp |
30914c |
local to buffer
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 7832,7843 ****
|
|
Karsten Hopp |
30914c |
uses another default.
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
! *'wildignorecase* *'wic'* *'nowildignorecase* *'nowic'*
|
|
Karsten Hopp |
30914c |
'wildignorecase' 'wic' boolean (default off)
|
|
Karsten Hopp |
30914c |
global
|
|
Karsten Hopp |
30914c |
{not in Vi}
|
|
Karsten Hopp |
30914c |
When set case is ignored when completing file names and directories.
|
|
Karsten Hopp |
30914c |
! Has no effect on systems where file name case is generally ignored.
|
|
Karsten Hopp |
30914c |
Does not apply when the shell is used to expand wildcards, which
|
|
Karsten Hopp |
30914c |
happens when there are special characters.
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
--- 7906,7917 ----
|
|
Karsten Hopp |
30914c |
uses another default.
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
! *'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'*
|
|
Karsten Hopp |
30914c |
'wildignorecase' 'wic' boolean (default off)
|
|
Karsten Hopp |
30914c |
global
|
|
Karsten Hopp |
30914c |
{not in Vi}
|
|
Karsten Hopp |
30914c |
When set case is ignored when completing file names and directories.
|
|
Karsten Hopp |
30914c |
! Has no effect when 'fileignorecase' is set.
|
|
Karsten Hopp |
30914c |
Does not apply when the shell is used to expand wildcards, which
|
|
Karsten Hopp |
30914c |
happens when there are special characters.
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
*** ../vim-7.3.871/src/version.c 2013-03-19 15:27:43.000000000 +0100
|
|
Karsten Hopp |
30914c |
--- src/version.c 2013-03-19 16:22:46.000000000 +0100
|
|
Karsten Hopp |
30914c |
***************
|
|
Karsten Hopp |
30914c |
*** 730,731 ****
|
|
Karsten Hopp |
30914c |
--- 730,733 ----
|
|
Karsten Hopp |
30914c |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
30914c |
+ /**/
|
|
Karsten Hopp |
30914c |
+ 872,
|
|
Karsten Hopp |
30914c |
/**/
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
--
|
|
Karsten Hopp |
30914c |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
30914c |
76. Your ISP regards you as a business partner rather than as a customer.
|
|
Karsten Hopp |
30914c |
|
|
Karsten Hopp |
30914c |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
30914c |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
30914c |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
30914c |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|