From 6e7d9e61c0e1b124ecd1c9148ff2a89c5c5f5a70 Mon Sep 17 00:00:00 2001 From: Joe Walker Date: Thu, 7 Apr 2011 06:07:17 +0100 Subject: [PATCH] provide a number of pref tweaks to give a fastpath to non-human commands --- lib/ace/keyboard/keybinding.js | 17 ++++++----------- support/cockpit | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/ace/keyboard/keybinding.js b/lib/ace/keyboard/keybinding.js index dcd42e57..8430a90d 100644 --- a/lib/ace/keyboard/keybinding.js +++ b/lib/ace/keyboard/keybinding.js @@ -82,7 +82,8 @@ var KeyBinding = function(editor) { if (!toExecute || !toExecute.command) { if (hashId != 0 || keyCode != 0) { toExecute = { - command: findKeyCommand(hashId, keyOrText) + command: findKeyCommand(hashId, keyOrText), + args: { } }; } else { toExecute = { @@ -93,16 +94,10 @@ var KeyBinding = function(editor) { } if (toExecute) { - // TODO: use requisition to execute the command rather than canon - // do we store a requ, if so where? - var success; - if (typeof toExecute.command === "string" && toExecute.args == null) { - this.$requisition.update({ typed: toExecute.command }); - success = this.$requisition.exec(); - } - else { - success = canon.exec(toExecute.command, this.$env, toExecute.args); - } + var success = this.$requisition.exec({ + typed: toExecute.command, + args: toExecute.args + }); if (success) { return event.stopEvent(e); diff --git a/support/cockpit b/support/cockpit index c4324538..193f1c44 160000 --- a/support/cockpit +++ b/support/cockpit @@ -1 +1 @@ -Subproject commit c432453874edb9fd4e999c833f66437351c4ff3f +Subproject commit 193f1c44bbb260c737ef077a47e638899a9375f7