Patch 8.2.4828
Problem: Fix for unmapping simplified key not fully tested.
Solution: Add a test case. (closes #10292)
Files: src/map.c, src/testdir/test_mapping.vim
*** ../vim-8.2.4827/src/map.c 2022-04-25 18:59:18.635925317 +0100
--- src/map.c 2022-04-26 12:26:52.840757128 +0100
***************
*** 726,731 ****
--- 726,733 ----
mpp = &(mp->m_next);
continue;
}
+ // In keyround for simplified keys, don't unmap
+ // a mapping without m_simplified flag.
if (keyround1_simplified && !mp->m_simplified)
break;
// We reset the indicated mode bits. If nothing
*** ../vim-8.2.4827/src/testdir/test_mapping.vim 2022-04-24 17:07:49.688853258 +0100
--- src/testdir/test_mapping.vim 2022-04-26 12:26:52.840757128 +0100
***************
*** 1627,1633 ****
set mouse&
endfunc
! func Test_unmap_simplfied()
map <C-I> foo
map <Tab> bar
call assert_equal('foo', maparg('<C-I>'))
--- 1627,1633 ----
set mouse&
endfunc
! func Test_unmap_simplifiable()
map <C-I> foo
map <Tab> bar
call assert_equal('foo', maparg('<C-I>'))
***************
*** 1636,1641 ****
--- 1636,1646 ----
call assert_equal('', maparg('<C-I>'))
call assert_equal('bar', maparg('<Tab>'))
unmap <Tab>
+
+ map <C-I> foo
+ unmap <Tab>
+ " This should not error
+ unmap <C-I>
endfunc
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.4827/src/version.c 2022-04-25 18:59:18.635925317 +0100
--- src/version.c 2022-04-26 12:27:33.180715946 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4828,
/**/
--
hundred-and-one symptoms of being an internet addict:
59. Your wife says communication is important in a marriage...so you buy
another computer and install a second phone line so the two of you can
chat.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///