mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-11-13 10:17:02 +03:00
Minor cleanup on handleKey config options to ensure clean list of bound keys
This commit is contained in:
parent
272f7826e2
commit
09f623477f
@ -245,6 +245,10 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
showCmdLine("", modeHandlerToEditorIdentity[new EditorIdentity(vscode.window.activeTextEditor).toString()]);
|
||||
});
|
||||
|
||||
// Clear boundKeyCombinations array incase there are any entries in it so
|
||||
// that we have a clean list of keys with no duplicates
|
||||
Configuration.boundKeyCombinations = [];
|
||||
|
||||
for (let keybinding of packagejson.contributes.keybindings) {
|
||||
let keyToBeBound = "";
|
||||
|
||||
@ -259,7 +263,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
keyToBeBound = keybinding.key;
|
||||
}
|
||||
|
||||
let bracketedKey = AngleBracketNotation.Normalize(keyToBeBound);
|
||||
const bracketedKey = AngleBracketNotation.Normalize(keyToBeBound);
|
||||
|
||||
// Store registered key bindings in bracket notation form
|
||||
Configuration.boundKeyCombinations.push(bracketedKey);
|
||||
|
@ -67,7 +67,7 @@ class ConfigurationClass {
|
||||
const handleKeys = vscode.workspace.getConfiguration('vim')
|
||||
.get<IHandleKeys[]>("handleKeys", []);
|
||||
|
||||
for (let bracketedKey of this.boundKeyCombinations) {
|
||||
for (const bracketedKey of this.boundKeyCombinations) {
|
||||
// Set context for key that is not used
|
||||
// This either happens when user sets useCtrlKeys to false (ctrl keys are not used then)
|
||||
// Or if user usese vim.handleKeys configuration option to set certain combinations to false
|
||||
|
Loading…
Reference in New Issue
Block a user