# HG changeset patch # User Bram Moolenaar # Date 1591302604 -7200 # Node ID fbee68c6aab10175d6acb1402509f9d9813bf3b9 # Parent f1f248c9b90d171ca72262559f30c12fcc52aa4f patch 8.2.0904: assuming modifyOtherKeys for rhs of mapping Commit: https://github.com/vim/vim/commit/46cd43bda102c3782bba1c4c629836e010734d77 Author: Bram Moolenaar Date: Thu Jun 4 22:22:11 2020 +0200 patch 8.2.0904: assuming modifyOtherKeys for rhs of mapping Problem: Assuming modifyOtherKeys for rhs of mapping. Solution: Ignore seenModifyOtherKeys for mapped characters. (closes https://github.com/vim/vim/issues/6200) diff --git a/src/getchar.c b/src/getchar.c --- a/src/getchar.c +++ b/src/getchar.c @@ -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 diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim --- a/src/testdir/test_gui.vim +++ b/src/testdir/test_gui.vim @@ -856,4 +856,14 @@ func Test_gui_run_cmd_in_terminal() let &guioptions = save_guioptions endfunc +func Test_gui_recursive_mapping() + nmap ' + nmap a :let didit = 1 + call feedkeys("'a", 'xt') + call assert_equal(1, didit) + + nunmap ' + nunmap a +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 904, +/**/ 903, /**/ 902,