Merge pull request #1626 from thomaswilburn/master

Rename "commmandKeyBinding" to have 33% less "m"
This commit is contained in:
Harutyun Amirjanyan 2013-09-25 12:09:57 -07:00
commit cc2f80f8c1
4 changed files with 10 additions and 10 deletions

View file

@ -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);

View file

@ -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) {

View file

@ -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

View file

@ -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];
};