Patch 8.2.1121

6 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 3, 2020, 12:15:40 PM7/3/20
to vim...@googlegroups.com

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\<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
--- 1593,1603 ----
call feedkeys(":r! ++enc=utf-8 r\<c-a>\<c-b>\"\<cr>", 'tx')
call assert_notmatch('^"r!.*\<runtest.vim\>', @:)
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
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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages