mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.0-039
This commit is contained in:
parent
ce6ef25cef
commit
ecbaf5570a
27
src/eval.c
27
src/eval.c
@ -11321,14 +11321,19 @@ f_index(argvars, rettv)
|
|||||||
|
|
||||||
static int inputsecret_flag = 0;
|
static int inputsecret_flag = 0;
|
||||||
|
|
||||||
|
static void get_user_input __ARGS((typval_T *argvars, typval_T *rettv, int inputdialog));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "input()" function
|
* This function is used by f_input() and f_inputdialog() functions. The third
|
||||||
* Also handles inputsecret() when inputsecret is set.
|
* argument to f_input() specifies the type of completion to use at the
|
||||||
|
* prompt. The third argument to f_inputdialog() specifies the value to return
|
||||||
|
* when the user cancels the prompt.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
f_input(argvars, rettv)
|
get_user_input(argvars, rettv, inputdialog)
|
||||||
typval_T *argvars;
|
typval_T *argvars;
|
||||||
typval_T *rettv;
|
typval_T *rettv;
|
||||||
|
int inputdialog;
|
||||||
{
|
{
|
||||||
char_u *prompt = get_tv_string_chk(&argvars[0]);
|
char_u *prompt = get_tv_string_chk(&argvars[0]);
|
||||||
char_u *p = NULL;
|
char_u *p = NULL;
|
||||||
@ -11378,7 +11383,7 @@ f_input(argvars, rettv)
|
|||||||
if (defstr != NULL)
|
if (defstr != NULL)
|
||||||
stuffReadbuffSpec(defstr);
|
stuffReadbuffSpec(defstr);
|
||||||
|
|
||||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN)
|
||||||
{
|
{
|
||||||
char_u *xp_name;
|
char_u *xp_name;
|
||||||
int xp_namelen;
|
int xp_namelen;
|
||||||
@ -11412,6 +11417,18 @@ f_input(argvars, rettv)
|
|||||||
cmd_silent = cmd_silent_save;
|
cmd_silent = cmd_silent_save;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* "input()" function
|
||||||
|
* Also handles inputsecret() when inputsecret is set.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
f_input(argvars, rettv)
|
||||||
|
typval_T *argvars;
|
||||||
|
typval_T *rettv;
|
||||||
|
{
|
||||||
|
get_user_input(argvars, rettv, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "inputdialog()" function
|
* "inputdialog()" function
|
||||||
*/
|
*/
|
||||||
@ -11452,7 +11469,7 @@ f_inputdialog(argvars, rettv)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
f_input(argvars, rettv);
|
get_user_input(argvars, rettv, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -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 */
|
||||||
|
/**/
|
||||||
|
39,
|
||||||
/**/
|
/**/
|
||||||
38,
|
38,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user