forked from aniani/vim
patch 8.2.1121: command completion not working after ++arg
Problem: Command completion not working after ++arg. Solution: Move skipping up. (Christian Brabandt, closes #6382)
This commit is contained in:
@@ -1099,6 +1099,15 @@ set_one_cmd_context(
|
|||||||
|
|
||||||
arg = skipwhite(p);
|
arg = skipwhite(p);
|
||||||
|
|
||||||
|
// Skip over ++argopt argument
|
||||||
|
if ((ea.argt & EX_ARGOPT) && *arg != NUL && STRNCMP(arg, "++", 2) == 0)
|
||||||
|
{
|
||||||
|
p = arg;
|
||||||
|
while (*p && !vim_isspace(*p))
|
||||||
|
MB_PTR_ADV(p);
|
||||||
|
arg = skipwhite(p);
|
||||||
|
}
|
||||||
|
|
||||||
if (ea.cmdidx == CMD_write || ea.cmdidx == CMD_update)
|
if (ea.cmdidx == CMD_write || ea.cmdidx == CMD_update)
|
||||||
{
|
{
|
||||||
if (*arg == '>') // append
|
if (*arg == '>') // append
|
||||||
@@ -1146,14 +1155,6 @@ set_one_cmd_context(
|
|||||||
arg = skipwhite(arg);
|
arg = skipwhite(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip over ++argopt argument
|
|
||||||
if ((ea.argt & EX_ARGOPT) && *arg != NUL && STRNCMP(arg, "++", 2) == 0)
|
|
||||||
{
|
|
||||||
p = arg;
|
|
||||||
while (*p && !vim_isspace(*p))
|
|
||||||
MB_PTR_ADV(p);
|
|
||||||
arg = skipwhite(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for '|' to separate commands and '"' to start comments.
|
// Check for '|' to separate commands and '"' to start comments.
|
||||||
// Don't do this for ":read !cmd" and ":write !cmd".
|
// Don't do this for ":read !cmd" and ":write !cmd".
|
||||||
|
@@ -1593,8 +1593,11 @@ func Test_read_shellcmd()
|
|||||||
call feedkeys(":r! ++enc=utf-8 r\<c-a>\<c-b>\"\<cr>", 'tx')
|
call feedkeys(":r! ++enc=utf-8 r\<c-a>\<c-b>\"\<cr>", 'tx')
|
||||||
call assert_notmatch('^"r!.*\<runtest.vim\>', @:)
|
call assert_notmatch('^"r!.*\<runtest.vim\>', @:)
|
||||||
call assert_match('^"r!.*\<rm\>', @:)
|
call assert_match('^"r!.*\<rm\>', @:)
|
||||||
|
|
||||||
|
call feedkeys(":r ++enc=utf-8 !rm\<c-a>\<c-b>\"\<cr>", 'tx')
|
||||||
|
call assert_notmatch('^"r.*\<runtest.vim\>', @:)
|
||||||
|
call assert_match('^"r ++enc\S\+ !.*\<rm\>', @:)
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1121,
|
||||||
/**/
|
/**/
|
||||||
1120,
|
1120,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user