]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.604 v7.3.604
authorBram Moolenaar <Bram@vim.org>
Mon, 16 Jul 2012 17:27:29 +0000 (19:27 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 16 Jul 2012 17:27:29 +0000 (19:27 +0200)
Problem:    inputdialog() doesn't use the cancel argument in the console.
            (David Fishburn)
Solution:   Use the third argument. (Christian Brabant)

src/eval.c
src/version.c

index 99b3bba24aec485987f6885a3bbf8562b326b2be..f9db2f9ffeb483d6fb0a8843237d265f75ec9056 100644 (file)
@@ -12940,6 +12940,7 @@ get_user_input(argvars, rettv, inputdialog)
                int     xp_namelen;
                long    argt;
 
+               /* input() with a third argument: completion */
                rettv->vval.v_string = NULL;
 
                xp_name = get_tv_string_buf_chk(&argvars[2], buf);
@@ -12958,6 +12959,11 @@ get_user_input(argvars, rettv, inputdialog)
            rettv->vval.v_string =
                getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr,
                                  xp_type, xp_arg);
+       if (rettv->vval.v_string == NULL
+               && argvars[1].v_type != VAR_UNKNOWN
+               && argvars[2].v_type != VAR_UNKNOWN)
+           rettv->vval.v_string = vim_strsave(get_tv_string_buf(
+                                                          &argvars[2], buf));
 
        vim_free(xp_arg);
 
index 6bf9708f3429d6559850b3a7b25a534b9d713e20..80d8c754736db5af422695e83f851fd26aa92981 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    604,
 /**/
     603,
 /**/