From 5023410c42fb730c8a3a3022af6fb4812f75f660 Mon Sep 17 00:00:00 2001 From: Thomas Wilburn Date: Wed, 25 Sep 2013 10:36:54 -0700 Subject: [PATCH] Typo of "commmand" is driving me nuts. --- lib/ace/commands/command_manager.js | 2 +- lib/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js | 2 +- lib/ace/keyboard/emacs.js | 8 ++++---- lib/ace/keyboard/hash_handler.js | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/ace/commands/command_manager.js b/lib/ace/commands/command_manager.js index e8a581ad..101227f6 100644 --- a/lib/ace/commands/command_manager.js +++ b/lib/ace/commands/command_manager.js @@ -21,7 +21,7 @@ var EventEmitter = require("../lib/event_emitter").EventEmitter; var CommandManager = function(platform, commands) { this.platform = platform; this.commands = this.byName = {}; - this.commmandKeyBinding = {}; + this.commandKeyBinding = {}; this.addCommands(commands); diff --git a/lib/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js b/lib/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js index e62d931a..e412bfba 100644 --- a/lib/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js +++ b/lib/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js @@ -67,7 +67,7 @@ module.exports.getEditorKeybordShortcuts = function(editor) { var keybindings = []; var commandMap = {}; editor.keyBinding.$handlers.forEach(function(handler) { - var ckb = handler.commmandKeyBinding; + var ckb = handler.commandKeyBinding; for (var i in ckb) { var modifier = parseInt(i); if (modifier == -1) { diff --git a/lib/ace/keyboard/emacs.js b/lib/ace/keyboard/emacs.js index a7350608..166c6857 100644 --- a/lib/ace/keyboard/emacs.js +++ b/lib/ace/keyboard/emacs.js @@ -198,7 +198,7 @@ exports.handler.bindKey = function(key, command) { if (!key) return; - var ckb = this.commmandKeyBinding; + var ckb = this.commandKeyBinding; key.split("|").forEach(function(keyPart) { keyPart = keyPart.toLowerCase(); ckb[keyPart] = command; @@ -206,7 +206,7 @@ exports.handler.bindKey = function(key, command) { // to be able to activate key combos with arbitrary length // Example: if keyPart is "C-c C-l t" then "C-c C-l t" will // get command assigned and "C-c" and "C-c C-l" will get - // a null command assigned in this.commmandKeyBinding. For + // a null command assigned in this.commandKeyBinding. For // the lookup logic see handleKeyboard() var keyParts = keyPart.split(" ").slice(0,-1); keyParts.reduce(function(keyMapKeys, keyPart, i) { @@ -257,9 +257,9 @@ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) { if (data.keyChain) key = data.keyChain += " " + key; // Key combo prefixes get stored as "null" (String!) in this - // this.commmandKeyBinding. When encountered no command is invoked but we + // this.commandKeyBinding. When encountered no command is invoked but we // buld up data.keyChain - var command = this.commmandKeyBinding[key]; + var command = this.commandKeyBinding[key]; data.keyChain = command == "null" ? key : ""; // there really is no command diff --git a/lib/ace/keyboard/hash_handler.js b/lib/ace/keyboard/hash_handler.js index f56532ee..9144b05c 100644 --- a/lib/ace/keyboard/hash_handler.js +++ b/lib/ace/keyboard/hash_handler.js @@ -37,7 +37,7 @@ var useragent = require("../lib/useragent"); function HashHandler(config, platform) { this.platform = platform || (useragent.isMac ? "mac" : "win"); this.commands = {}; - this.commmandKeyBinding = {}; + this.commandKeyBinding = {}; this.addCommands(config); }; @@ -61,7 +61,7 @@ function HashHandler(config, platform) { // exhaustive search is brute force but since removeCommand is // not a performance critical operation this should be OK - var ckb = this.commmandKeyBinding; + var ckb = this.commandKeyBinding; for (var hashId in ckb) { for (var key in ckb[hashId]) { if (ckb[hashId][key] == command) @@ -78,7 +78,7 @@ function HashHandler(config, platform) { return; } - var ckb = this.commmandKeyBinding; + var ckb = this.commandKeyBinding; key.split("|").forEach(function(keyPart) { var binding = this.parseKeys(keyPart, command); var hashId = binding.hashId; @@ -158,7 +158,7 @@ function HashHandler(config, platform) { }; this.findKeyCommand = function findKeyCommand(hashId, keyString) { - var ckbr = this.commmandKeyBinding; + var ckbr = this.commandKeyBinding; return ckbr[hashId] && ckbr[hashId][keyString]; };