1
0
forked from aniani/vim

patch 8.1.1251: no test for completion of mapping keys

Problem:    No test for completion of mapping keys.
Solution:   Add a test.  Also clean up the code.
This commit is contained in:
Bram Moolenaar
2019-05-03 15:13:57 +02:00
parent d788543ac6
commit 2cb9f02532
5 changed files with 50 additions and 14 deletions

View File

@@ -4263,7 +4263,7 @@ set_context_in_map_cmd(
}
/*
* Find all mapping/abbreviation names that match regexp 'prog'.
* Find all mapping/abbreviation names that match regexp "regmatch"'.
* For command line expansion of ":[un]map" and ":[un]abbrev" in all modes.
* Return OK if matches found, FAIL otherwise.
*/
@@ -4343,7 +4343,7 @@ ExpandMappings(
{
if (mp->m_mode & expand_mapmodes)
{
p = translate_mapping(mp->m_keys, TRUE);
p = translate_mapping(mp->m_keys);
if (p != NULL && vim_regexec(regmatch, p, (colnr_T)0))
{
if (round == 1)