updated for version 7.3.736
Problem: File name completion in input() escapes white space. (Frederic
Hardy)
Solution: Do not escape white space. (Christian Brabandt)
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 249dafb..57582e8 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -102,7 +102,7 @@
static void redrawcmdprompt __ARGS((void));
static void cursorcmd __ARGS((void));
static int ccheck_abbr __ARGS((int));
-static int nextwild __ARGS((expand_T *xp, int type, int options));
+static int nextwild __ARGS((expand_T *xp, int type, int options, int escape));
static void escape_fname __ARGS((char_u **pp));
static int showmatches __ARGS((expand_T *xp, int wildmenu));
static void set_expand_context __ARGS((expand_T *xp));
@@ -810,9 +810,11 @@
did_wild_list = TRUE;
}
if (wim_flags[wim_index] & WIM_LONGEST)
- res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP);
+ res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP,
+ firstc != '@');
else if (wim_flags[wim_index] & WIM_FULL)
- res = nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP);
+ res = nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP,
+ firstc != '@');
else
res = OK; /* don't insert 'wildchar' now */
}
@@ -823,9 +825,11 @@
/* if 'wildmode' first contains "longest", get longest
* common part */
if (wim_flags[0] & WIM_LONGEST)
- res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP);
+ res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP,
+ firstc != '@');
else
- res = nextwild(&xpc, WILD_EXPAND_KEEP, WILD_NO_BEEP);
+ res = nextwild(&xpc, WILD_EXPAND_KEEP, WILD_NO_BEEP,
+ firstc != '@');
/* if interrupted while completing, behave like it failed */
if (got_int)
@@ -860,7 +864,8 @@
int p_wmnu_save = p_wmnu;
p_wmnu = 0;
#endif
- nextwild(&xpc, WILD_PREV, 0); /* remove match */
+ /* remove match */
+ nextwild(&xpc, WILD_PREV, 0, firstc != '@');
#ifdef FEAT_WILDMENU
p_wmnu = p_wmnu_save;
#endif
@@ -874,9 +879,11 @@
redrawcmd();
did_wild_list = TRUE;
if (wim_flags[wim_index] & WIM_LONGEST)
- nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP);
+ nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP,
+ firstc != '@');
else if (wim_flags[wim_index] & WIM_FULL)
- nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP);
+ nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP,
+ firstc != '@');
}
else
vim_beep();
@@ -899,9 +906,9 @@
/* <S-Tab> goes to last match, in a clumsy way */
if (c == K_S_TAB && KeyTyped)
{
- if (nextwild(&xpc, WILD_EXPAND_KEEP, 0) == OK
- && nextwild(&xpc, WILD_PREV, 0) == OK
- && nextwild(&xpc, WILD_PREV, 0) == OK)
+ if (nextwild(&xpc, WILD_EXPAND_KEEP, 0, firstc != '@') == OK
+ && nextwild(&xpc, WILD_PREV, 0, firstc != '@') == OK
+ && nextwild(&xpc, WILD_PREV, 0, firstc != '@') == OK)
goto cmdline_changed;
}
@@ -1418,7 +1425,7 @@
goto cmdline_not_changed;
case Ctrl_A: /* all matches */
- if (nextwild(&xpc, WILD_ALL, 0) == FAIL)
+ if (nextwild(&xpc, WILD_ALL, 0, firstc != '@') == FAIL)
break;
goto cmdline_changed;
@@ -1454,7 +1461,7 @@
#endif
/* completion: longest common part */
- if (nextwild(&xpc, WILD_LONGEST, 0) == FAIL)
+ if (nextwild(&xpc, WILD_LONGEST, 0, firstc != '@') == FAIL)
break;
goto cmdline_changed;
@@ -1462,8 +1469,8 @@
case Ctrl_P: /* previous match */
if (xpc.xp_numfiles > 0)
{
- if (nextwild(&xpc, (c == Ctrl_P) ? WILD_PREV : WILD_NEXT, 0)
- == FAIL)
+ if (nextwild(&xpc, (c == Ctrl_P) ? WILD_PREV : WILD_NEXT,
+ 0, firstc != '@') == FAIL)
break;
goto cmdline_changed;
}
@@ -3338,10 +3345,11 @@
* normal character (instead of being expanded). This allows :s/^I^D etc.
*/
static int
-nextwild(xp, type, options)
+nextwild(xp, type, options, escape)
expand_T *xp;
int type;
int options; /* extra options for ExpandOne() */
+ int escape; /* if TRUE, escape the returned matches */
{
int i, j;
char_u *p1;
@@ -3390,7 +3398,9 @@
else
{
int use_options = options |
- WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE;
+ WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT;
+ if (escape)
+ use_options |= WILD_ESCAPE;
if (p_wic)
use_options += WILD_ICASE;
diff --git a/src/version.c b/src/version.c
index 80c82d6..058ffbc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -726,6 +726,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 736,
+/**/
735,
/**/
734,