summaryrefslogtreecommitdiffstats
path: root/src/cmdexpand.c
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2021-10-21 11:39:53 +0100
committerBram Moolenaar <Bram@vim.org>2021-10-21 11:39:53 +0100
commitae38a9db7770b38889fbf06908cc69d42b463a73 (patch)
tree730a81a68e6095c38961c0c4912e4eb256adecd2 /src/cmdexpand.c
parentb811de5d49a23b20df82a80533d0602cda49029e (diff)
patch 8.2.3550: completion() does not work properlyv8.2.3550
Problem: completion() does not work properly. Solution: Set xp_line and add WILD_HOME_REPLACE. (Shougo Matsushita, closes #9016)
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r--src/cmdexpand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index c98e126a5c..71c4f690cb 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -978,6 +978,7 @@ set_one_cmd_context(
ExpandInit(xp);
xp->xp_pattern = buff;
+ xp->xp_line = buff;
xp->xp_context = EXPAND_COMMANDS; // Default until we get past command
ea.argt = 0;
@@ -2891,7 +2892,7 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
expand_T xpc;
int filtered = FALSE;
int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH
- | WILD_NO_BEEP;
+ | WILD_NO_BEEP | WILD_HOME_REPLACE;
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL