Patch 8.0.0402
Problem: :map completion does not have <special>. (Dominique Pelle)
Solution: Recognize <special> in completion. Add a test.
Files: src/getchar.c, src/testdir/test_cmdline.vim
*** ../vim-8.0.0401/src/getchar.c 2017-01-21 20:04:17.570757762 +0100
--- src/getchar.c 2017-03-02 22:59:16.888826155 +0100
***************
*** 4216,4221 ****
--- 4216,4226 ----
arg = skipwhite(arg + 8);
continue;
}
+ if (STRNCMP(arg, "<special>", 9) == 0)
+ {
+ arg = skipwhite(arg + 9);
+ continue;
+ }
#ifdef FEAT_EVAL
if (STRNCMP(arg, "<script>", 8) == 0)
{
***************
*** 4267,4273 ****
{
count = 0;
! for (i = 0; i < 6; ++i)
{
if (i == 0)
p = (char_u *)"<silent>";
--- 4272,4278 ----
{
count = 0;
! for (i = 0; i < 7; ++i)
{
if (i == 0)
p = (char_u *)"<silent>";
***************
*** 4285,4290 ****
--- 4290,4297 ----
#endif
else if (i == 5)
p = (char_u *)"<nowait>";
+ else if (i == 6)
+ p = (char_u *)"<special>";
else
continue;
*** ../vim-8.0.0401/src/testdir/test_cmdline.vim 2017-02-09
22:28:11.354931464 +0100
--- src/testdir/test_cmdline.vim 2017-03-02 23:05:20.073914654 +0100
***************
*** 25,30 ****
--- 25,50 ----
set nowildmenu
endfunc
+ func Test_map_completion()
+ if !has('cmdline_compl')
+ return
+ endif
+ call feedkeys(":map <unique> <si\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <unique> <silent>', getreg(':'))
+ call feedkeys(":map <script> <un\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <script> <unique>', getreg(':'))
+ call feedkeys(":map <expr> <sc\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <expr> <script>', getreg(':'))
+ call feedkeys(":map <buffer> <e\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <buffer> <expr>', getreg(':'))
+ call feedkeys(":map <nowait> <b\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <nowait> <buffer>', getreg(':'))
+ call feedkeys(":map <special> <no\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <special> <nowait>', getreg(':'))
+ call feedkeys(":map <silent> <sp\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"map <silent> <special>', getreg(':'))
+ endfunc
+
func Test_match_completion()
if !has('cmdline_compl')
return
*** ../vim-8.0.0401/src/version.c 2017-03-02 22:47:56.898286649 +0100
--- src/version.c 2017-03-02 23:03:33.534768400 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 402,
/**/
--
Nothing is fool-proof to a sufficiently talented fool.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.