summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-16 18:34:57 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-16 18:34:57 +0200
commitfafb4b18cd4aa5897537f53003b31bb83d7362df (patch)
treedb0dc6de4c04bfd8964506937cd6facae7dd1391 /src/map.c
parent17efc7fa05daea1e916a25620c71a5626b7f298d (diff)
patch 8.1.2159: some mappings are listed twicev8.1.2159
Problem: Some mappings are listed twice. Solution: Skip mappings duplicated for modifyOtherKeys. (closes #5064)
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/map.c b/src/map.c
index 00f4608b07..74fc60c1fc 100644
--- a/src/map.c
+++ b/src/map.c
@@ -554,7 +554,7 @@ do_map(
for ( ; mp != NULL && !got_int; mp = mp->m_next)
{
// check entries with the same mode
- if ((mp->m_mode & mode) != 0)
+ if (!mp->m_simplified && (mp->m_mode & mode) != 0)
{
if (!haskey) // show all entries
{
@@ -599,15 +599,19 @@ do_map(
for (mp = *mpp; mp != NULL && !got_int; mp = *mpp)
{
- if (!(mp->m_mode & mode)) // skip entries with wrong mode
+ if ((mp->m_mode & mode) == 0)
{
+ // skip entries with wrong mode
mpp = &(mp->m_next);
continue;
}
if (!haskey) // show all entries
{
- showmap(mp, map_table != maphash);
- did_it = TRUE;
+ if (!mp->m_simplified)
+ {
+ showmap(mp, map_table != maphash);
+ did_it = TRUE;
+ }
}
else // do we have a match?
{
@@ -643,8 +647,11 @@ do_map(
}
else if (!hasarg) // show matching entry
{
- showmap(mp, map_table != maphash);
- did_it = TRUE;
+ if (!mp->m_simplified)
+ {
+ showmap(mp, map_table != maphash);
+ did_it = TRUE;
+ }
}
else if (n != len) // new entry is ambiguous
{