1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-16 15:15:44 +01:00

Fix mode indicators in :map output.

This commit is contained in:
Doug Kearns
2009-08-16 01:44:20 +10:00
parent 11f6f460ff
commit 83808b2a13

View File

@@ -526,16 +526,13 @@ function Mappings() //{{{
list: function (modes, filter) list: function (modes, filter)
{ {
let modeSign = ""; let modeSign = "";
modes.forEach(function (mode)
{ // TODO: Vim hides "nv" in a :map and "v" and "n" in :vmap and
if (mode == modes.NORMAL) // :nmap respectively if the map is not exclusive.
modeSign += "n"; modes.forEach(function (mode) {
if ((mode == modes.INSERT || mode == modes.TEXTAREA) && modeSign.indexOf("i") == -1) for (let m in modules.modes.mainModes)
modeSign += "i"; if (mode == m.mask && modeSign.indexOf(m.char) == -1)
if (mode == modes.COMMAND_LINE) modeSign += m.char;
modeSign += "c";
if (mode == modes.MESSAGRE)
modeSign += "m";
}); });
let maps = mappingsIterator(modes, user); let maps = mappingsIterator(modes, user);