mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2206: :exe command line completion only works for first argument
Problem: :exe command line completion only works for first argument. Solution: Skip over text if more is following. (closes #7546)
This commit is contained in:
18
src/eval.c
18
src/eval.c
@@ -1904,6 +1904,24 @@ set_context_for_expression(
|
||||
while ((c = *++arg) != NUL && (c == ' ' || c == '\t'))
|
||||
/* skip */ ;
|
||||
}
|
||||
|
||||
// ":exe one two" completes "two"
|
||||
if ((cmdidx == CMD_execute
|
||||
|| cmdidx == CMD_echo
|
||||
|| cmdidx == CMD_echon
|
||||
|| cmdidx == CMD_echomsg)
|
||||
&& xp->xp_context == EXPAND_EXPRESSION)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
char_u *n = skiptowhite(arg);
|
||||
|
||||
if (n == arg || IS_WHITE_OR_NUL(*skipwhite(n)))
|
||||
break;
|
||||
arg = skipwhite(n);
|
||||
}
|
||||
}
|
||||
|
||||
xp->xp_pattern = arg;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user