mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
updated for version 7.0-224
This commit is contained in:
@@ -8924,7 +8924,7 @@ f_expand(argvars, rettv)
|
|||||||
if (*s == '%' || *s == '#' || *s == '<')
|
if (*s == '%' || *s == '#' || *s == '<')
|
||||||
{
|
{
|
||||||
++emsg_off;
|
++emsg_off;
|
||||||
rettv->vval.v_string = eval_vars(s, &len, NULL, &errormsg, s);
|
rettv->vval.v_string = eval_vars(s, s, &len, NULL, &errormsg, NULL);
|
||||||
--emsg_off;
|
--emsg_off;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -4176,6 +4176,7 @@ expand_filename(eap, cmdlinep, errormsgp)
|
|||||||
int srclen;
|
int srclen;
|
||||||
char_u *p;
|
char_u *p;
|
||||||
int n;
|
int n;
|
||||||
|
int escaped;
|
||||||
|
|
||||||
#ifdef FEAT_QUICKFIX
|
#ifdef FEAT_QUICKFIX
|
||||||
/* Skip a regexp pattern for ":vimgrep[add] pat file..." */
|
/* Skip a regexp pattern for ":vimgrep[add] pat file..." */
|
||||||
@@ -4216,7 +4217,8 @@ expand_filename(eap, cmdlinep, errormsgp)
|
|||||||
/*
|
/*
|
||||||
* Try to find a match at this position.
|
* Try to find a match at this position.
|
||||||
*/
|
*/
|
||||||
repl = eval_vars(p, &srclen, &(eap->do_ecmd_lnum), errormsgp, eap->arg);
|
repl = eval_vars(p, eap->arg, &srclen, &(eap->do_ecmd_lnum),
|
||||||
|
errormsgp, &escaped);
|
||||||
if (*errormsgp != NULL) /* error detected */
|
if (*errormsgp != NULL) /* error detected */
|
||||||
return FAIL;
|
return FAIL;
|
||||||
if (repl == NULL) /* no match found */
|
if (repl == NULL) /* no match found */
|
||||||
@@ -4235,11 +4237,15 @@ expand_filename(eap, cmdlinep, errormsgp)
|
|||||||
vim_free(l);
|
vim_free(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Need to escape white space et al. with a backslash. Don't do this
|
/* Need to escape white space et al. with a backslash.
|
||||||
* for shell commands (may have to use quotes instead). Don't do this
|
* Don't do this for:
|
||||||
* for non-unix systems when there is a single argument (spaces don't
|
* - replacement that already has been escaped: "##"
|
||||||
* separate arguments then). */
|
* - shell commands (may have to use quotes instead).
|
||||||
|
* - non-unix systems when there is a single argument (spaces don't
|
||||||
|
* separate arguments then).
|
||||||
|
*/
|
||||||
if (!eap->usefilter
|
if (!eap->usefilter
|
||||||
|
&& !escaped
|
||||||
&& eap->cmdidx != CMD_bang
|
&& eap->cmdidx != CMD_bang
|
||||||
&& eap->cmdidx != CMD_make
|
&& eap->cmdidx != CMD_make
|
||||||
&& eap->cmdidx != CMD_lmake
|
&& eap->cmdidx != CMD_lmake
|
||||||
@@ -9280,12 +9286,14 @@ ex_tag_cmd(eap, name)
|
|||||||
* number of characters to skip.
|
* number of characters to skip.
|
||||||
*/
|
*/
|
||||||
char_u *
|
char_u *
|
||||||
eval_vars(src, usedlen, lnump, errormsg, srcstart)
|
eval_vars(src, srcstart, usedlen, lnump, errormsg, escaped)
|
||||||
char_u *src; /* pointer into commandline */
|
char_u *src; /* pointer into commandline */
|
||||||
|
char_u *srcstart; /* beginning of valid memory for src */
|
||||||
int *usedlen; /* characters after src that are used */
|
int *usedlen; /* characters after src that are used */
|
||||||
linenr_T *lnump; /* line number for :e command, or NULL */
|
linenr_T *lnump; /* line number for :e command, or NULL */
|
||||||
char_u **errormsg; /* pointer to error message */
|
char_u **errormsg; /* pointer to error message */
|
||||||
char_u *srcstart; /* beginning of valid memory for src */
|
int *escaped; /* return value has escaped white space (can
|
||||||
|
* be NULL) */
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char_u *s;
|
char_u *s;
|
||||||
@@ -9332,6 +9340,8 @@ eval_vars(src, usedlen, lnump, errormsg, srcstart)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
*errormsg = NULL;
|
*errormsg = NULL;
|
||||||
|
if (escaped != NULL)
|
||||||
|
*escaped = FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if there is something to do.
|
* Check if there is something to do.
|
||||||
@@ -9407,6 +9417,8 @@ eval_vars(src, usedlen, lnump, errormsg, srcstart)
|
|||||||
result = arg_all();
|
result = arg_all();
|
||||||
resultbuf = result;
|
resultbuf = result;
|
||||||
*usedlen = 2;
|
*usedlen = 2;
|
||||||
|
if (escaped != NULL)
|
||||||
|
*escaped = TRUE;
|
||||||
#ifdef FEAT_MODIFY_FNAME
|
#ifdef FEAT_MODIFY_FNAME
|
||||||
skip_mod = TRUE;
|
skip_mod = TRUE;
|
||||||
#endif
|
#endif
|
||||||
@@ -9627,7 +9639,7 @@ expand_sfile(arg)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* replace "<sfile>" with the sourced file name, and do ":" stuff */
|
/* replace "<sfile>" with the sourced file name, and do ":" stuff */
|
||||||
repl = eval_vars(p, &srclen, NULL, &errormsg, result);
|
repl = eval_vars(p, result, &srclen, NULL, &errormsg, NULL);
|
||||||
if (errormsg != NULL)
|
if (errormsg != NULL)
|
||||||
{
|
{
|
||||||
if (*errormsg)
|
if (*errormsg)
|
||||||
|
@@ -44,7 +44,7 @@ extern int vim_mkdir_emsg __ARGS((char_u *name, int prot));
|
|||||||
extern FILE *open_exfile __ARGS((char_u *fname, int forceit, char *mode));
|
extern FILE *open_exfile __ARGS((char_u *fname, int forceit, char *mode));
|
||||||
extern void update_topline_cursor __ARGS((void));
|
extern void update_topline_cursor __ARGS((void));
|
||||||
extern void exec_normal_cmd __ARGS((char_u *cmd, int remap, int silent));
|
extern void exec_normal_cmd __ARGS((char_u *cmd, int remap, int silent));
|
||||||
extern char_u *eval_vars __ARGS((char_u *src, int *usedlen, linenr_T *lnump, char_u **errormsg, char_u *srcstart));
|
extern char_u *eval_vars __ARGS((char_u *src, char_u *srcstart, int *usedlen, linenr_T *lnump, char_u **errormsg, int *escaped));
|
||||||
extern char_u *expand_sfile __ARGS((char_u *arg));
|
extern char_u *expand_sfile __ARGS((char_u *arg));
|
||||||
extern int put_eol __ARGS((FILE *fd));
|
extern int put_eol __ARGS((FILE *fd));
|
||||||
extern int put_line __ARGS((FILE *fd, char *s));
|
extern int put_line __ARGS((FILE *fd, char *s));
|
||||||
|
@@ -666,6 +666,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 */
|
||||||
|
/**/
|
||||||
|
224,
|
||||||
/**/
|
/**/
|
||||||
223,
|
223,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user