]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0904: assuming modifyOtherKeys for rhs of mapping v8.2.0904
authorBram Moolenaar <Bram@vim.org>
Thu, 4 Jun 2020 20:22:11 +0000 (22:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 4 Jun 2020 20:22:11 +0000 (22:22 +0200)
Problem:    Assuming modifyOtherKeys for rhs of mapping.
Solution:   Ignore seenModifyOtherKeys for mapped characters. (closes #6200)

src/getchar.c
src/testdir/test_gui.vim
src/version.c

index ace56863e7a3af56e6c817fe3b9e6b789720d773..fcfad9dc0fe4b85b93f097dc885796f60bd992af 100644 (file)
@@ -2355,7 +2355,8 @@ handle_mapping(
            // Skip ":lmap" mappings if keys were mapped.
            if (mp->m_keys[0] == tb_c1
                    && (mp->m_mode & local_State)
-                   && !(mp->m_simplified && seenModifyOtherKeys)
+                   && !(mp->m_simplified && seenModifyOtherKeys
+                                                    && typebuf.tb_maplen == 0)
                    && ((mp->m_mode & LANGMAP) == 0 || typebuf.tb_maplen == 0))
            {
 #ifdef FEAT_LANGMAP
index c9e3f7f13f268cb340b896c3e2ea6f05116a811f..808ba5d8b88e59d58e54ffad161764b8164e6b0b 100644 (file)
@@ -856,4 +856,14 @@ func Test_gui_run_cmd_in_terminal()
   let &guioptions = save_guioptions
 endfunc
 
+func Test_gui_recursive_mapping()
+  nmap ' <C-W>
+  nmap <C-W>a :let didit = 1<CR>
+  call feedkeys("'a", 'xt')
+  call assert_equal(1, didit)
+
+  nunmap '
+  nunmap <C-W>a
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
index 399886e349f59bfe691cf2955a55bf73ccd471c1..3d24837e2658e457a27dd54096ee33125caf0ffd 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    904,
 /**/
     903,
 /**/