141
return rules;
142
}
144
>
// Do a second pass and keep only non-removed keybindings
145
>
const result: ResolvedKeybindingItem[] = [];
146
>
for (let i = 0, len = rules.length; i < len; i++) {
147
>
const rule = rules[i];
148
>
149
>
if (!rule.command || rule.command.length === 0) {
150
result.push(rule);
151
continue;
152
}
154
>
continue;
155
>
}
156
>
const commandRemovals = removals.get(rule.command);
157
>
if (!commandRemovals || !rule.isDefault) {
158
result.push(rule);
159
continue;
160
}
162
>
for (const commandRemoval of commandRemovals) {
163
>
const when = commandRemoval.when;
164
>
if (this._isTargetedForRemoval(rule, commandRemoval.chords, when)) {
165
isRemoved = true;
166
break;
167
}
169
>
if (!isRemoved) {
170
result.push(rule);
171
continue;
172
}
174
>
return result;
175
}
176