aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-31 21:06:34 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-29 15:51:03 +0800
commitc3634a02613459c85c228c400513835361ecc44a (patch)
tree64cb11f4849df0127b3e5cb9058ef80c50c12dfb /src/nvim/testdir
parent7029b4b44a1cea58af3f54a4d62757b29a8e6aeb (diff)
downloadrneovim-c3634a02613459c85c228c400513835361ecc44a.tar.gz
rneovim-c3634a02613459c85c228c400513835361ecc44a.tar.bz2
rneovim-c3634a02613459c85c228c400513835361ecc44a.zip
vim-patch:8.1.2159: some mappings are listed twice
Problem: Some mappings are listed twice. Solution: Skip mappings duplicated for modifyOtherKeys. (closes vim/vim#5064) https://github.com/vim/vim/commit/fafb4b18cd4aa5897537f53003b31bb83d7362df
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_mapping.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim
index a9500f8f77..c46336460d 100644
--- a/src/nvim/testdir/test_mapping.vim
+++ b/src/nvim/testdir/test_mapping.vim
@@ -429,6 +429,22 @@ func Test_error_in_map_expr()
exe buf .. 'bwipe!'
endfunc
+func Test_list_mappings()
+ inoremap <C-M> CtrlM
+ inoremap <A-S> AltS
+ inoremap <S-/> ShiftSlash
+ call assert_equal([
+ \ 'i <S-/> * ShiftSlash',
+ \ 'i <M-S> * AltS',
+ \ 'i <C-M> * CtrlM',
+ \], execute('imap')->trim()->split("\n"))
+ iunmap <C-M>
+ iunmap <A-S>
+ call assert_equal(['i <S-/> * ShiftSlash'], execute('imap')->trim()->split("\n"))
+ iunmap <S-/>
+ call assert_equal(['No mapping found'], execute('imap')->trim()->split("\n"))
+endfunc
+
func Test_expr_map_gets_cursor()
new
call setline(1, ['one', 'some w!rd'])