summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-04 22:22:11 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-04 22:22:11 +0200
commit46cd43bda102c3782bba1c4c629836e010734d77 (patch)
tree685e27f1f47839b3789eb0947c8808dae73942aa
parent852ea366d6432e719ffdd95e9fb7d49a9a960187 (diff)
patch 8.2.0904: assuming modifyOtherKeys for rhs of mappingv8.2.0904
Problem: Assuming modifyOtherKeys for rhs of mapping. Solution: Ignore seenModifyOtherKeys for mapped characters. (closes #6200)
-rw-r--r--src/getchar.c3
-rw-r--r--src/testdir/test_gui.vim10
-rw-r--r--src/version.c2
3 files changed, 14 insertions, 1 deletions
diff --git a/src/getchar.c b/src/getchar.c
index ace56863e7..fcfad9dc0f 100644
--- 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
index c9e3f7f13f..808ba5d8b8 100644
--- 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 ' <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
diff --git a/src/version.c b/src/version.c
index 399886e349..3d24837e26 100644
--- 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,