1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-05 08:45:46 +01:00

Don't add :*map commands multiple times.

Multiple modes may share the same mode character. E.g. Textarea and
Insert modes.
This commit is contained in:
Doug Kearns
2009-06-16 23:46:07 +10:00
parent 4570c6ced5
commit 5e8de51bcb

View File

@@ -292,7 +292,7 @@ function Mappings() //{{{
addMapCommands("", [modes.NORMAL, modes.VISUAL], "");
for (let mode in modes.mainModes)
if (mode.char)
if (mode.char && !commands.get(mode.char + "map"))
addMapCommands(mode.char,
[m.mask for (m in modes.mainModes) if (m.char == mode.char)],
[mode.disp.toLowerCase()]);