summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-07-16 19:27:29 +0200
committerBram Moolenaar <Bram@vim.org>2012-07-16 19:27:29 +0200
commitb5c9cb555ef84d4db5f6feafd49b9ac079615968 (patch)
tree21c110b815dfdecb11173138e7fe44a32a7e4b62 /src/eval.c
parentbdb620560b3199828f9852e9c9453d56e951a5f9 (diff)
downloadvim-b5c9cb555ef84d4db5f6feafd49b9ac079615968.zip
updated for version 7.3.604
Problem: inputdialog() doesn't use the cancel argument in the console. (David Fishburn) Solution: Use the third argument. (Christian Brabant)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 99b3bba24..f9db2f9ff 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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);