diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-07-13 06:31:00 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-07-13 06:31:00 +0000 |
commit | ecbaf5570ae86fe25f832d6c154e1b7400dab01b (patch) | |
tree | 4766b2373743fd79daefe2ced84856a985c83000 /src | |
parent | ce6ef25cef1fb542b3d9bd6a52a55b6418934e6d (diff) |
updated for version 7.0-039v7.0.039
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 27 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 24 insertions, 5 deletions
diff --git a/src/eval.c b/src/eval.c index 01610fe3bb..a6b2553efc 100644 --- a/src/eval.c +++ b/src/eval.c @@ -11321,14 +11321,19 @@ f_index(argvars, rettv) static int inputsecret_flag = 0; +static void get_user_input __ARGS((typval_T *argvars, typval_T *rettv, int inputdialog)); + /* - * "input()" function - * Also handles inputsecret() when inputsecret is set. + * This function is used by f_input() and f_inputdialog() functions. The third + * 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 -f_input(argvars, rettv) +get_user_input(argvars, rettv, inputdialog) typval_T *argvars; typval_T *rettv; + int inputdialog; { char_u *prompt = get_tv_string_chk(&argvars[0]); char_u *p = NULL; @@ -11378,7 +11383,7 @@ f_input(argvars, rettv) if (defstr != NULL) stuffReadbuffSpec(defstr); - if (argvars[2].v_type != VAR_UNKNOWN) + if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN) { char_u *xp_name; int xp_namelen; @@ -11413,6 +11418,18 @@ f_input(argvars, rettv) } /* + * "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 */ static void @@ -11452,7 +11469,7 @@ f_inputdialog(argvars, rettv) } else #endif - f_input(argvars, rettv); + get_user_input(argvars, rettv, TRUE); } /* diff --git a/src/version.c b/src/version.c index bee5a39731..6c4c2fd650 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 39, +/**/ 38, /**/ 37, |