Patch 9.0.1329
Problem: Completion of map includes simplified ones.
Solution: Do not complete simplified mappings. (closes #12013)
Files: src/map.c, src/testdir/test_mapping.vim
*** ../vim-9.0.1328/src/map.c 2023-01-27 21:03:08.895101849 +0000
--- src/map.c 2023-02-19 20:57:44.091515499 +0000
***************
*** 180,186 ****
len = msg_outtrans_special(mp->m_keys, TRUE, 0);
do
{
! msg_putchar(' '); // padd with blanks
++len;
} while (len < 12);
--- 180,186 ----
len = msg_outtrans_special(mp->m_keys, TRUE, 0);
do
{
! msg_putchar(' '); // pad with blanks
++len;
} while (len < 12);
***************
*** 1445,1451 ****
mp = maphash[hash];
for (; mp; mp = mp->m_next)
{
! if (!(mp->m_mode & expand_mapmodes))
continue;
p = translate_mapping(mp->m_keys);
--- 1445,1451 ----
mp = maphash[hash];
for (; mp; mp = mp->m_next)
{
! if (mp->m_simplified || !(mp->m_mode & expand_mapmodes))
continue;
p = translate_mapping(mp->m_keys);
*** ../vim-9.0.1328/src/testdir/test_mapping.vim 2022-11-27
12:45:37.311707363 +0000
--- src/testdir/test_mapping.vim 2023-02-19 20:57:44.091515499 +0000
***************
*** 783,793 ****
call feedkeys(":abbr! \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal("\"abbr! \x01", @:)
! " Multiple matches for a map
! nmap ,f /H<CR>
! omap ,f /H<CR>
call feedkeys(":map ,\<C-A>\<C-B>\"\<CR>", 'tx')
! call assert_equal('"map ,f', @:)
mapclear
endfunc
--- 783,794 ----
call feedkeys(":abbr! \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal("\"abbr! \x01", @:)
! " When multiple matches have the same {lhs}, it should only appear once.
! " The simplified form should also not be included.
! nmap ,<C-F> /H<CR>
! omap ,<C-F> /H<CR>
call feedkeys(":map ,\<C-A>\<C-B>\"\<CR>", 'tx')
! call assert_equal('"map ,<C-F>', @:)
mapclear
endfunc
*** ../vim-9.0.1328/src/version.c 2023-02-19 20:49:35.159795893 +0000
--- src/version.c 2023-02-19 20:59:02.483483523 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1329,
/**/
--
Although the scythe isn't pre-eminent among the weapons of war, anyone who
has been on the wrong end of, say, a peasants' revolt will know that in
skilled hands it is fearsome.
-- (Terry Pratchett, Mort)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20230219210105.507E91C07A0%40moolenaar.net.