mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.2-010
This commit is contained in:
@@ -2540,7 +2540,6 @@ utf_head_off(base, p)
|
|||||||
return (int)(p - q);
|
return (int)(p - q);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
|
||||||
/*
|
/*
|
||||||
* Copy a character from "*fp" to "*tp" and advance the pointers.
|
* Copy a character from "*fp" to "*tp" and advance the pointers.
|
||||||
*/
|
*/
|
||||||
@@ -2555,7 +2554,6 @@ mb_copy_char(fp, tp)
|
|||||||
*tp += l;
|
*tp += l;
|
||||||
*fp += l;
|
*fp += l;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the offset from "p" to the first byte of a character. When "p" is
|
* Return the offset from "p" to the first byte of a character. When "p" is
|
||||||
|
@@ -1257,7 +1257,6 @@ vim_strsave_escaped_ext(string, esc_chars, cc, bsl)
|
|||||||
return escaped_string;
|
return escaped_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(BACKSLASH_IN_FILENAME) || defined(FEAT_EVAL) || defined(PROTO)
|
|
||||||
/*
|
/*
|
||||||
* Return TRUE when 'shell' has "csh" in the tail.
|
* Return TRUE when 'shell' has "csh" in the tail.
|
||||||
*/
|
*/
|
||||||
@@ -1266,9 +1265,7 @@ csh_like_shell()
|
|||||||
{
|
{
|
||||||
return (strstr((char *)gettail(p_sh), "csh") != NULL);
|
return (strstr((char *)gettail(p_sh), "csh") != NULL);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
|
||||||
/*
|
/*
|
||||||
* Escape "string" for use as a shell argument with system().
|
* Escape "string" for use as a shell argument with system().
|
||||||
* This uses single quotes, except when we know we need to use double qoutes
|
* This uses single quotes, except when we know we need to use double qoutes
|
||||||
@@ -1391,7 +1388,6 @@ vim_strsave_shellescape(string, do_special)
|
|||||||
|
|
||||||
return escaped_string;
|
return escaped_string;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Like vim_strsave(), but make all characters uppercase.
|
* Like vim_strsave(), but make all characters uppercase.
|
||||||
|
35
src/normal.c
35
src/normal.c
@@ -5469,6 +5469,11 @@ nv_ident(cap)
|
|||||||
STRCPY(buf, "he! ");
|
STRCPY(buf, "he! ");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* An external command will probably use an argument starting
|
||||||
|
* with "-" as an option. To avoid trouble we skip the "-". */
|
||||||
|
while (*ptr == '-')
|
||||||
|
++ptr;
|
||||||
|
|
||||||
/* When a count is given, turn it into a range. Is this
|
/* When a count is given, turn it into a range. Is this
|
||||||
* really what we want? */
|
* really what we want? */
|
||||||
isman = (STRCMP(kp, "man") == 0);
|
isman = (STRCMP(kp, "man") == 0);
|
||||||
@@ -5511,15 +5516,34 @@ nv_ident(cap)
|
|||||||
/*
|
/*
|
||||||
* Now grab the chars in the identifier
|
* Now grab the chars in the identifier
|
||||||
*/
|
*/
|
||||||
|
if (cmdchar == 'K' && !kp_help)
|
||||||
|
{
|
||||||
|
/* Escape the argument properly for a shell command */
|
||||||
|
p = vim_strsave_shellescape(ptr, TRUE);
|
||||||
|
if (p == NULL)
|
||||||
|
{
|
||||||
|
vim_free(buf);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
buf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
|
||||||
|
if (buf == NULL)
|
||||||
|
{
|
||||||
|
vim_free(buf);
|
||||||
|
vim_free(p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
STRCAT(buf, p);
|
||||||
|
vim_free(p);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (cmdchar == '*')
|
if (cmdchar == '*')
|
||||||
aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
|
aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\");
|
||||||
else if (cmdchar == '#')
|
else if (cmdchar == '#')
|
||||||
aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
|
aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
|
||||||
else if (cmdchar == 'K' && !kp_help)
|
|
||||||
aux_ptr = (char_u *)" \t\\\"|!";
|
|
||||||
else
|
else
|
||||||
/* Don't escape spaces and Tabs in a tag with a backslash */
|
/* Don't escape spaces and Tabs in a tag with a backslash */
|
||||||
aux_ptr = (char_u *)"\\|\"";
|
aux_ptr = (char_u *)"\\|\"\n*?[";
|
||||||
|
|
||||||
p = buf + STRLEN(buf);
|
p = buf + STRLEN(buf);
|
||||||
while (n-- > 0)
|
while (n-- > 0)
|
||||||
@@ -5528,8 +5552,8 @@ nv_ident(cap)
|
|||||||
if (vim_strchr(aux_ptr, *ptr) != NULL)
|
if (vim_strchr(aux_ptr, *ptr) != NULL)
|
||||||
*p++ = '\\';
|
*p++ = '\\';
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
/* When current byte is a part of multibyte character, copy all bytes
|
/* When current byte is a part of multibyte character, copy all
|
||||||
* of that character. */
|
* bytes of that character. */
|
||||||
if (has_mbyte)
|
if (has_mbyte)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -5542,6 +5566,7 @@ nv_ident(cap)
|
|||||||
*p++ = *ptr++;
|
*p++ = *ptr++;
|
||||||
}
|
}
|
||||||
*p = NUL;
|
*p = NUL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Execute the command.
|
* Execute the command.
|
||||||
|
@@ -676,6 +676,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 */
|
||||||
|
/**/
|
||||||
|
10,
|
||||||
/**/
|
/**/
|
||||||
9,
|
9,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user