diff src/cmdexpand.c @ 26032:162ef12a3b5f v8.2.3550

patch 8.2.3550: completion() does not work properly Commit: https://github.com/vim/vim/commit/ae38a9db7770b38889fbf06908cc69d42b463a73 Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Thu Oct 21 11:39:53 2021 +0100 patch 8.2.3550: completion() does not work properly Problem: completion() does not work properly. Solution: Set xp_line and add WILD_HOME_REPLACE. (Shougo Matsushita, closes #9016)
author Bram Moolenaar <Bram@vim.org>
date Thu, 21 Oct 2021 12:45:04 +0200
parents e8873138ffbb
children ee1c116b91ea
line wrap: on
line diff
--- 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, typva
     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