patch 8.2.1007: completion doesn't work after ":r ++arg !"
Problem: Completion doesn't work after ":r ++arg !".
Solution: Skip over "++arg". (Christian Brabandt, closes #6275,
closes #6258)
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index eeb9c2f..5d772ea 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -1568,5 +1568,20 @@
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