diff options
-rw-r--r-- | src/cmdexpand.c | 9 | ||||
-rw-r--r-- | src/testdir/test_cmdline.vim | 15 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 9508d669d..63f0cc7b1 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -1146,6 +1146,15 @@ set_one_cmd_context( 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. // Don't do this for ":read !cmd" and ":write !cmd". if ((ea.argt & EX_TRLBAR) && !usefilter) diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index eeb9c2f54..5d772eacd 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -1568,5 +1568,20 @@ func Test_zero_line_search() q! endfunc +func Test_read_shellcmd() + CheckUnix + if executable('ls') + " There should be ls in the $PATH + call feedkeys(":r! l\<c-a>\<c-b>\"\<cr>", 'tx') + call assert_match('^"r! .*\<ls\>', @:) + endif + + if executable('rm') + call feedkeys(":r! ++enc=utf-8 r\<c-a>\<c-b>\"\<cr>", 'tx') + call assert_notmatch('^"r!.*\<runtest.vim\>', @:) + call assert_match('^"r!.*\<rm\>', @:) + endif +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 080a8b159..6ea02b95a 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1007, +/**/ 1006, /**/ 1005, |