1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-05 01:05:46 +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)
{
let modeSign = "";
modes.forEach(function (mode)
{
if (mode == modes.NORMAL)
modeSign += "n";
if ((mode == modes.INSERT || mode == modes.TEXTAREA) && modeSign.indexOf("i") == -1)
modeSign += "i";
if (mode == modes.COMMAND_LINE)
modeSign += "c";
if (mode == modes.MESSAGRE)
modeSign += "m";
// TODO: Vim hides "nv" in a :map and "v" and "n" in :vmap and
// :nmap respectively if the map is not exclusive.
modes.forEach(function (mode) {
for (let m in modules.modes.mainModes)
if (mode == m.mask && modeSign.indexOf(m.char) == -1)
modeSign += m.char;
});
let maps = mappingsIterator(modes, user);