To: vim_dev@googlegroups.com Subject: Patch 8.2.1007 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1007 Problem: Completion doesn't work after ":r ++arg !". Solution: Skip over "++arg". (Christian Brabandt, closes #6275, closes #6258) Files: src/cmdexpand.c, src/testdir/test_cmdline.vim *** ../vim-8.2.1006/src/cmdexpand.c 2020-06-16 20:03:38.743351051 +0200 --- src/cmdexpand.c 2020-06-18 21:10:29.554324339 +0200 *************** *** 1146,1151 **** --- 1146,1160 ---- 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) *** ../vim-8.2.1006/src/testdir/test_cmdline.vim 2020-06-16 20:03:38.747351038 +0200 --- src/testdir/test_cmdline.vim 2020-06-18 21:10:29.554324339 +0200 *************** *** 1568,1572 **** --- 1568,1587 ---- q! endfunc + func Test_read_shellcmd() + CheckUnix + if executable('ls') + " There should be ls in the $PATH + call feedkeys(":r! l\\\"\", 'tx') + call assert_match('^"r! .*\', @:) + endif + + if executable('rm') + call feedkeys(":r! ++enc=utf-8 r\\\"\", 'tx') + call assert_notmatch('^"r!.*\', @:) + call assert_match('^"r!.*\', @:) + endif + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.1006/src/version.c 2020-06-18 20:50:06.349864243 +0200 --- src/version.c 2020-06-18 21:14:06.025302736 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1007, /**/ -- There can't be a crisis today, my schedule is already full. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///