mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.0.1329: completion of map includes simplified ones (#22335)
Problem: Completion of map includes simplified ones.
Solution: Do not complete simplified mappings. (closes vim/vim#12013)
997b8a015c
This commit is contained in:
parent
020d3e355e
commit
8784f064f1
@ -1342,7 +1342,7 @@ int ExpandMappings(char *pat, regmatch_T *regmatch, int *numMatches, char ***mat
|
||||
mp = maphash[hash];
|
||||
}
|
||||
for (; mp; mp = mp->m_next) {
|
||||
if (!(mp->m_mode & expand_mapmodes)) {
|
||||
if (mp->m_simplified || !(mp->m_mode & expand_mapmodes)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -759,11 +759,12 @@ func Test_mapcomplete()
|
||||
call feedkeys(":abbr! \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal("\"abbr! \x01", @:)
|
||||
|
||||
" Multiple matches for a map
|
||||
nmap ,f /H<CR>
|
||||
omap ,f /H<CR>
|
||||
" When multiple matches have the same {lhs}, it should only appear once.
|
||||
" The simplified form should also not be included.
|
||||
nmap ,<C-F> /H<CR>
|
||||
omap ,<C-F> /H<CR>
|
||||
call feedkeys(":map ,\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"map ,f', @:)
|
||||
call assert_equal('"map ,<C-F>', @:)
|
||||
mapclear
|
||||
endfunc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user