From d531ef6813919dd6df8ca6927cd99ec3c0a65635 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 26 Apr 2022 15:31:29 +0800 Subject: vim-patch:8.2.0867: using \{xxx} for encoding a modifier is not nice Problem: Using \{xxx} for encoding a modifier is not nice. Solution: Use \<*xxx> instead, since it's the same as \ but producing a different code. https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f Use this notation in langmap_spec. --- src/nvim/testdir/test_backspace_opt.vim | 4 ++-- src/nvim/testdir/test_mapping.vim | 6 +++--- src/nvim/testdir/test_messages.vim | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_backspace_opt.vim b/src/nvim/testdir/test_backspace_opt.vim index 64342fbdf8..59e94d2898 100644 --- a/src/nvim/testdir/test_backspace_opt.vim +++ b/src/nvim/testdir/test_backspace_opt.vim @@ -76,7 +76,7 @@ func Test_backspace_ctrl_u() set cpo-=< inoremap - exe "normal Avim3\{C-U}\\" + exe "normal Avim3\<*C-U>\\" iunmap exe "normal Avim4\\\\" @@ -86,7 +86,7 @@ func Test_backspace_ctrl_u() exe "normal A vim6\Azwei\u\\\" inoremap - exe "normal A vim7\{C-U}\{C-U}\\" + exe "normal A vim7\<*C-U>\<*C-U>\\" call assert_equal([ \ "1 this shouldn't be deleted", diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim index c6f052ab44..f03d157fac 100644 --- a/src/nvim/testdir/test_mapping.vim +++ b/src/nvim/testdir/test_mapping.vim @@ -62,7 +62,7 @@ func Test_map_ctrl_c_insert() inoremap cnoremap dummy cunmap - call feedkeys("GoTEST2: CTRL-C |\{C-C}A|\", "xt") + call feedkeys("GoTEST2: CTRL-C |\<*C-C>A|\", "xt") call assert_equal('TEST2: CTRL-C |A|', getline('$')) unmap! set nomodified @@ -71,7 +71,7 @@ endfunc func Test_map_ctrl_c_visual() " mapping of ctrl-c in Visual mode vnoremap :$put ='vmap works' - call feedkeys("GV\{C-C}\", "xt") + call feedkeys("GV\<*C-C>\", "xt") call assert_equal('vmap works', getline('$')) vunmap set nomodified @@ -221,7 +221,7 @@ endfunc func Test_map_meta_quotes() imap foo - call feedkeys("Go-\{M-\"}-\", "xt") + call feedkeys("Go-\<*M-\">-\", "xt") call assert_equal("-foo-", getline('$')) set nomodified iunmap diff --git a/src/nvim/testdir/test_messages.vim b/src/nvim/testdir/test_messages.vim index 7cb2a2f1fa..8be0c79499 100644 --- a/src/nvim/testdir/test_messages.vim +++ b/src/nvim/testdir/test_messages.vim @@ -115,7 +115,7 @@ endfunc func Test_mapping_at_hit_return_prompt() nnoremap :echo "hit ctrl-b" call feedkeys(":ls\", "xt") - call feedkeys("\{C-B}", "xt") + call feedkeys("\<*C-B>", "xt") call assert_match('hit ctrl-b', Screenline(&lines - 1)) nunmap endfunc -- cgit