1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 19:54:12 +01:00

Fix :map<cr> when there are user-defined mappings created in JavaScript.

This commit is contained in:
Kris Maglione
2010-09-25 15:06:06 -04:00
parent 4a2c703854
commit 4afe237a32

View File

@@ -180,8 +180,8 @@ const Mappings = Module("mappings", {
_mappingsIterator: function (modes, stack) {
modes = modes.slice();
return (map for ([i, map] in Iterator(stack[modes.shift()].sort(function (m1, m2) String.localeCompare(m1.name, m2.name))))
if (modes.every(function (mode) stack[mode].
some(function (m) array.equals(m.rhs, map.rhs) && m.name == map.name))))
if (map.rhs && modes.every(function (mode) stack[mode].
some(function (m) m.rhs && array.equals(m.rhs, map.rhs) && m.name == map.name))))
},
// NOTE: just normal mode for now