forked from aniani/vim
patch 8.1.2159: some mappings are listed twice
Problem: Some mappings are listed twice. Solution: Skip mappings duplicated for modifyOtherKeys. (closes #5064)
This commit is contained in:
@@ -442,3 +442,19 @@ func Test_error_in_map_expr()
|
||||
call delete('Xtest.vim')
|
||||
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
|
||||
|
Reference in New Issue
Block a user