Patch 8.2.2221

8 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 26, 2020, 6:07:30 AM12/26/20
to vim...@googlegroups.com

Patch 8.2.2221
Problem: If <Down> is mapped on the command line 'wildchar' is inserted.
Solution: Set KeyTyped when using 'wildchar'. (closes #7552)
Files: src/cmdexpand.c, src/testdir/test_cmdline.vim


*** ../vim-8.2.2220/src/cmdexpand.c 2020-12-21 19:59:04.565197736 +0100
--- src/cmdexpand.c 2020-12-26 12:04:52.441164089 +0100
***************
*** 2680,2686 ****
--- 2680,2689 ----
// Hitting <Down> after "emenu Name.": complete submenu
if (c == K_DOWN && cclp->cmdpos > 0
&& cclp->cmdbuff[cclp->cmdpos - 1] == '.')
+ {
c = p_wc;
+ KeyTyped = TRUE; // in case the key was mapped
+ }
else if (c == K_UP)
{
// Hitting <Up>: Remove one submenu name in front of the
***************
*** 2714,2719 ****
--- 2717,2723 ----
if (i > 0)
cmdline_del(cclp, i);
c = p_wc;
+ KeyTyped = TRUE; // in case the key was mapped
xp->xp_context = EXPAND_NOTHING;
}
}
***************
*** 2738,2743 ****
--- 2742,2748 ----
{
// go down a directory
c = p_wc;
+ KeyTyped = TRUE; // in case the key was mapped
}
else if (STRNCMP(xp->xp_pattern, upseg + 1, 3) == 0 && c == K_DOWN)
{
***************
*** 2763,2768 ****
--- 2768,2774 ----
{
cmdline_del(cclp, j - 2);
c = p_wc;
+ KeyTyped = TRUE; // in case the key was mapped
}
}
else if (c == K_UP)
*** ../vim-8.2.2220/src/testdir/test_cmdline.vim 2020-12-24 17:15:49.909113037 +0100
--- src/testdir/test_cmdline.vim 2020-12-26 12:05:28.629008229 +0100
***************
*** 58,63 ****
--- 58,76 ----
call feedkeys(":e Xdir1/\<Tab>\<Down>\<Up>\<Right>\<CR>", 'tx')
call assert_equal('testfile1', getline(1))

+ + " <C-J>/<C-K> mappings to go up/down directories when 'wildcharm' is
+ " different than 'wildchar'.
+ set wildcharm=<C-Z>
+ cnoremap <C-J> <Down><C-Z>
+ cnoremap <C-K> <Up><C-Z>
+ call feedkeys(":e Xdir1/\<Tab>\<C-J>\<CR>", 'tx')
+ call assert_equal('testfile3', getline(1))
+ call feedkeys(":e Xdir1/\<Tab>\<C-J>\<C-K>\<CR>", 'tx')
+ call assert_equal('testfile1', getline(1))
+ set wildcharm=0
+ cunmap <C-J>
+ cunmap <C-K>
+
" Test for canceling the wild menu by adding a character
redrawstatus
call feedkeys(":e Xdir1/\<Tab>x\<C-B>\"\<CR>", 'xt')
*** ../vim-8.2.2220/src/version.c 2020-12-25 22:30:13.072086418 +0100
--- src/version.c 2020-12-26 12:05:50.796912768 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2221,
/**/

--
In many of the more relaxed civilizations on the Outer Eastern Rim of the
Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the
great "Encyclopedia Galactica" as the standard repository of all knowledge
and wisdom, for though it has many omissions and contains much that is
apocryphal, or at least wildly inaccurate, it scores over the older, more
pedestrian work in two important respects.
First, it is slightly cheaper; and second, it has the words "DON'T PANIC"
inscribed in large friendly letters on its cover.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

/// 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 ///

Dominique Pellé

unread,
Dec 26, 2020, 7:31:40 PM12/26/20
to vim_dev
Hi

I see a spurious plus sign + introduced by patch 8.2.2221
at the start of line src/testdir/test_cmdline.vim:61. See:

https://github.com/vim/vim/blob/master/src/testdir/test_cmdline.vim#L61

It was introduced by the recent patch v8.2.2221.

Regards
Dominique

Bram Moolenaar

unread,
Dec 27, 2020, 8:44:06 AM12/27/20
to vim...@googlegroups.com, Dominique Pellé
Must have been a copy/paste from a diff file.
It doesn't cause problems, right?
I'll remove it and it will be part of a later patch.

--
What a wonderfully exciting cough! Do you mind if I join you?
Reply all
Reply to author
Forward
0 new messages