1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-02 20:54:10 +01:00

Check (v[0] in orig || orig[v[0]]) in JS completion again. The latter catches a lot of members in XPC wrapped objects

This commit is contained in:
Kris Maglione
2008-11-20 21:03:34 +00:00
parent ebdac3be1f
commit 5b647a5c22
3 changed files with 56 additions and 51 deletions

View File

@@ -94,12 +94,16 @@ function Mappings() //{{{
function addMap(map, userMap)
{
var where = userMap ? user : main;
map.modes.forEach(function (mode) { where[mode].push(map); });
map.modes.forEach(function (mode) {
if (!(mode in where))
where[mode] = [];
where[mode].push(map);
});
}
function getMap(mode, cmd, stack)
{
var maps = stack[mode];
var maps = stack[mode] || [];
for (let [,map] in Iterator(maps))
{
@@ -112,7 +116,7 @@ function Mappings() //{{{
function removeMap(mode, cmd)
{
var maps = user[mode];
var maps = user[mode] || [];
var names;
for (let [i, map] in Iterator(maps))