forked from aniani/vim
patch 9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline argument
Problem: 'findexpr' completion doesn't set v:fname to cmdline argument. Solution: Set v:fname to the cmdline argument as-is (zeertzjq). closes: #15934 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
baab7c0865
commit
20e045f781
@@ -50,6 +50,7 @@ cmdline_fuzzy_completion_supported(expand_T *xp)
|
||||
&& xp->xp_context != EXPAND_FILES
|
||||
&& xp->xp_context != EXPAND_FILES_IN_PATH
|
||||
&& xp->xp_context != EXPAND_FILETYPE
|
||||
&& xp->xp_context != EXPAND_FINDEXPR
|
||||
&& xp->xp_context != EXPAND_HELP
|
||||
&& xp->xp_context != EXPAND_KEYMAP
|
||||
&& xp->xp_context != EXPAND_OLD_SETTING
|
||||
@@ -1418,7 +1419,8 @@ addstar(
|
||||
|
||||
// For help tags the translation is done in find_help_tags().
|
||||
// For a tag pattern starting with "/" no translation is needed.
|
||||
if (context == EXPAND_HELP
|
||||
if (context == EXPAND_FINDEXPR
|
||||
|| context == EXPAND_HELP
|
||||
|| context == EXPAND_COLORS
|
||||
|| context == EXPAND_COMPILER
|
||||
|| context == EXPAND_OWNSYNTAX
|
||||
@@ -2138,7 +2140,8 @@ set_context_by_cmdname(
|
||||
case CMD_sfind:
|
||||
case CMD_tabfind:
|
||||
if (xp->xp_context == EXPAND_FILES)
|
||||
xp->xp_context = EXPAND_FILES_IN_PATH;
|
||||
xp->xp_context = *get_findexpr() != NUL ? EXPAND_FINDEXPR
|
||||
: EXPAND_FILES_IN_PATH;
|
||||
break;
|
||||
case CMD_cd:
|
||||
case CMD_chdir:
|
||||
@@ -2850,7 +2853,7 @@ expand_files_and_dirs(
|
||||
}
|
||||
}
|
||||
|
||||
if (xp->xp_context == EXPAND_FILES_IN_PATH && *get_findexpr() != NUL)
|
||||
if (xp->xp_context == EXPAND_FINDEXPR)
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
ret = expand_findexpr(pat, matches, numMatches);
|
||||
@@ -3119,6 +3122,7 @@ ExpandFromContext(
|
||||
if (xp->xp_context == EXPAND_FILES
|
||||
|| xp->xp_context == EXPAND_DIRECTORIES
|
||||
|| xp->xp_context == EXPAND_FILES_IN_PATH
|
||||
|| xp->xp_context == EXPAND_FINDEXPR
|
||||
|| xp->xp_context == EXPAND_DIRS_IN_CDPATH)
|
||||
return expand_files_and_dirs(xp, pat, matches, numMatches, flags,
|
||||
options);
|
||||
|
Reference in New Issue
Block a user