]> granicus.if.org Git - vim/commitdiff
updated for version 7.0-039 v7.0.039
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Jul 2006 06:31:00 +0000 (06:31 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Jul 2006 06:31:00 +0000 (06:31 +0000)
src/eval.c
src/version.c

index 01610fe3bb6c86d97b37419ec1543528c7bee3e6..a6b2553efc9b8719194bcc779d0510a8d7e986da 100644 (file)
@@ -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;
@@ -11412,6 +11417,18 @@ f_input(argvars, rettv)
     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
  */
@@ -11452,7 +11469,7 @@ f_inputdialog(argvars, rettv)
     }
     else
 #endif
-       f_input(argvars, rettv);
+       get_user_input(argvars, rettv, TRUE);
 }
 
 /*
index bee5a3973182d20a7934a90b502aa09d8e2b36cb..6c4c2fd650db37deea75ea4e002d7ac245b2dabd 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    39,
 /**/
     38,
 /**/