# HG changeset patch # User Bram Moolenaar # Date 1342459649 -7200 # Node ID acd91c9741a6d0185b7c63db412888de4f904118 # Parent e92f6b13cb3d0d6cbc80b41960eaf9091b32637d 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) diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -12940,6 +12940,7 @@ get_user_input(argvars, rettv, inputdial 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, inputdial 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); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 604, +/**/ 603, /**/ 602,