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 -- [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/20220426113044.4CFD31C04EA%40moolenaar.net.

Raspunde prin e-mail lui