mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-20 20:05: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:
@@ -292,7 +292,7 @@ function Mappings() //{{{
|
|||||||
addMapCommands("", [modes.NORMAL, modes.VISUAL], "");
|
addMapCommands("", [modes.NORMAL, modes.VISUAL], "");
|
||||||
|
|
||||||
for (let mode in modes.mainModes)
|
for (let mode in modes.mainModes)
|
||||||
if (mode.char)
|
if (mode.char && !commands.get(mode.char + "map"))
|
||||||
addMapCommands(mode.char,
|
addMapCommands(mode.char,
|
||||||
[m.mask for (m in modes.mainModes) if (m.char == mode.char)],
|
[m.mask for (m in modes.mainModes) if (m.char == mode.char)],
|
||||||
[mode.disp.toLowerCase()]);
|
[mode.disp.toLowerCase()]);
|
||||||
|
|||||||
Reference in New Issue
Block a user