To: vim_dev@googlegroups.com Subject: Patch 8.2.1121 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1121 Problem: Command completion not working after ++arg. Solution: Move skipping up. (Christian Brabandt, closes #6382) Files: src/cmdexpand.c, src/testdir/test_cmdline.vim *** ../vim-8.2.1120/src/cmdexpand.c 2020-06-18 21:14:25.649217425 +0200 --- src/cmdexpand.c 2020-07-03 18:11:16.358785846 +0200 *************** *** 1099,1104 **** --- 1099,1113 ---- 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 (*arg == '>') // append *************** *** 1146,1159 **** 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". --- 1155,1160 ---- *** ../vim-8.2.1120/src/testdir/test_cmdline.vim 2020-06-28 13:10:17.546125326 +0200 --- src/testdir/test_cmdline.vim 2020-07-03 18:11:16.362785830 +0200 *************** *** 1593,1600 **** call feedkeys(":r! ++enc=utf-8 r\\\"\", 'tx') call assert_notmatch('^"r!.*\', @:) call assert_match('^"r!.*\', @:) endif endfunc - " vim: shiftwidth=2 sts=2 expandtab --- 1593,1603 ---- call feedkeys(":r! ++enc=utf-8 r\\\"\", 'tx') call assert_notmatch('^"r!.*\', @:) call assert_match('^"r!.*\', @:) + + call feedkeys(":r ++enc=utf-8 !rm\\\"\", 'tx') + call assert_notmatch('^"r.*\', @:) + call assert_match('^"r ++enc\S\+ !.*\', @:) endif endfunc " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.1120/src/version.c 2020-07-03 18:00:00.293531826 +0200 --- src/version.c 2020-07-03 18:12:37.414515910 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1121, /**/ -- BLACK KNIGHT: I'm invincible! ARTHUR: You're a looney. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///