convert to using gcli api, and sync with latest gcli

This commit is contained in:
Joe Walker 2011-03-30 11:50:54 +01:00
commit d8cb48191d
5 changed files with 69 additions and 69 deletions

View file

@ -41,7 +41,7 @@
define(function(require, exports, module) { define(function(require, exports, module) {
var lang = require("pilot/lang"); var lang = require("pilot/lang");
var canon = require("cockpit/canon"); var gcli = require("cockpit/index");
function bindKey(win, mac) { function bindKey(win, mac) {
return { return {
@ -55,22 +55,22 @@ function bindKey(win, mac) {
* TODO: This could be done more concisely and reversibly * TODO: This could be done more concisely and reversibly
*/ */
exports.startup = function() { exports.startup = function() {
canon.addCommand({ gcli.addCommand({
name: "null", name: "null",
exec: function(env, args, request) { } exec: function(env, args, request) { }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectall", name: "selectall",
bindKey: bindKey("Ctrl-A", "Command-A"), bindKey: bindKey("Ctrl-A", "Command-A"),
exec: function(env, args, request) { env.editor.selectAll(); } exec: function(env, args, request) { env.editor.selectAll(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "removeline", name: "removeline",
bindKey: bindKey("Ctrl-D", "Command-D"), bindKey: bindKey("Ctrl-D", "Command-D"),
exec: function(env, args, request) { env.editor.removeLines(); } exec: function(env, args, request) { env.editor.removeLines(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotoline", name: "gotoline",
description: "Move the cursor to the given line", description: "Move the cursor to the given line",
bindKey: bindKey("Ctrl-L", "Command-L"), bindKey: bindKey("Ctrl-L", "Command-L"),
@ -87,22 +87,22 @@ exports.startup = function() {
env.editor.gotoLine(args.line); env.editor.gotoLine(args.line);
} }
}); });
canon.addCommand({ gcli.addCommand({
name: "togglecomment", name: "togglecomment",
bindKey: bindKey("Ctrl-7", "Command-7"), bindKey: bindKey("Ctrl-7", "Command-7"),
exec: function(env, args, request) { env.editor.toggleCommentLines(); } exec: function(env, args, request) { env.editor.toggleCommentLines(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "findnext", name: "findnext",
bindKey: bindKey("Ctrl-K", "Command-G"), bindKey: bindKey("Ctrl-K", "Command-G"),
exec: function(env, args, request) { env.editor.findNext(); } exec: function(env, args, request) { env.editor.findNext(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "findprevious", name: "findprevious",
bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
exec: function(env, args, request) { env.editor.findPrevious(); } exec: function(env, args, request) { env.editor.findPrevious(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "find", name: "find",
description: "Search for the next instance of a string", description: "Search for the next instance of a string",
bindKey: bindKey("Ctrl-F", "Command-F"), bindKey: bindKey("Ctrl-F", "Command-F"),
@ -117,7 +117,7 @@ exports.startup = function() {
env.editor.find(args.findWhat); env.editor.find(args.findWhat);
} }
}); });
canon.addCommand({ gcli.addCommand({
name: "replace", name: "replace",
description: "Replace the next instance of a string with a given replacement", description: "Replace the next instance of a string with a given replacement",
bindKey: bindKey("Ctrl-R", "Command-Option-F"), bindKey: bindKey("Ctrl-R", "Command-Option-F"),
@ -140,7 +140,7 @@ exports.startup = function() {
env.editor.replace(args.replacement, {needle: args.findWhat}); env.editor.replace(args.replacement, {needle: args.findWhat});
} }
}); });
canon.addCommand({ gcli.addCommand({
name: "replaceall", name: "replaceall",
description: "Replace all instances of a string with a given replacement", description: "Replace all instances of a string with a given replacement",
bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"), bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"),
@ -163,187 +163,187 @@ exports.startup = function() {
env.editor.replaceAll(args.replacement, {needle: args.findWhat}); env.editor.replaceAll(args.replacement, {needle: args.findWhat});
} }
}); });
canon.addCommand({ gcli.addCommand({
name: "undo", name: "undo",
bindKey: bindKey("Ctrl-Z", "Command-Z"), bindKey: bindKey("Ctrl-Z", "Command-Z"),
exec: function(env, args, request) { env.editor.undo(); } exec: function(env, args, request) { env.editor.undo(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "redo", name: "redo",
bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
exec: function(env, args, request) { env.editor.redo(); } exec: function(env, args, request) { env.editor.redo(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "overwrite", name: "overwrite",
bindKey: bindKey("Insert", "Insert"), bindKey: bindKey("Insert", "Insert"),
exec: function(env, args, request) { env.editor.toggleOverwrite(); } exec: function(env, args, request) { env.editor.toggleOverwrite(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "copylinesup", name: "copylinesup",
bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"), bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"),
exec: function(env, args, request) { env.editor.copyLinesUp(); } exec: function(env, args, request) { env.editor.copyLinesUp(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "movelinesup", name: "movelinesup",
bindKey: bindKey("Alt-Up", "Option-Up"), bindKey: bindKey("Alt-Up", "Option-Up"),
exec: function(env, args, request) { env.editor.moveLinesUp(); } exec: function(env, args, request) { env.editor.moveLinesUp(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selecttostart", name: "selecttostart",
bindKey: bindKey("Alt-Shift-Up", "Command-Shift-Up"), bindKey: bindKey("Alt-Shift-Up", "Command-Shift-Up"),
exec: function(env, args, request) { env.editor.getSelection().selectFileStart(); } exec: function(env, args, request) { env.editor.getSelection().selectFileStart(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotostart", name: "gotostart",
bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"), bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"),
exec: function(env, args, request) { env.editor.navigateFileStart(); } exec: function(env, args, request) { env.editor.navigateFileStart(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectup", name: "selectup",
bindKey: bindKey("Shift-Up", "Shift-Up"), bindKey: bindKey("Shift-Up", "Shift-Up"),
exec: function(env, args, request) { env.editor.getSelection().selectUp(); } exec: function(env, args, request) { env.editor.getSelection().selectUp(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "golineup", name: "golineup",
bindKey: bindKey("Up", "Up|Ctrl-P"), bindKey: bindKey("Up", "Up|Ctrl-P"),
exec: function(env, args, request) { env.editor.navigateUp(args.times); } exec: function(env, args, request) { env.editor.navigateUp(args.times); }
}); });
canon.addCommand({ gcli.addCommand({
name: "copylinesdown", name: "copylinesdown",
bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"), bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"),
exec: function(env, args, request) { env.editor.copyLinesDown(); } exec: function(env, args, request) { env.editor.copyLinesDown(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "movelinesdown", name: "movelinesdown",
bindKey: bindKey("Alt-Down", "Option-Down"), bindKey: bindKey("Alt-Down", "Option-Down"),
exec: function(env, args, request) { env.editor.moveLinesDown(); } exec: function(env, args, request) { env.editor.moveLinesDown(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selecttoend", name: "selecttoend",
bindKey: bindKey("Alt-Shift-Down", "Command-Shift-Down"), bindKey: bindKey("Alt-Shift-Down", "Command-Shift-Down"),
exec: function(env, args, request) { env.editor.getSelection().selectFileEnd(); } exec: function(env, args, request) { env.editor.getSelection().selectFileEnd(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotoend", name: "gotoend",
bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"), bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"),
exec: function(env, args, request) { env.editor.navigateFileEnd(); } exec: function(env, args, request) { env.editor.navigateFileEnd(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectdown", name: "selectdown",
bindKey: bindKey("Shift-Down", "Shift-Down"), bindKey: bindKey("Shift-Down", "Shift-Down"),
exec: function(env, args, request) { env.editor.getSelection().selectDown(); } exec: function(env, args, request) { env.editor.getSelection().selectDown(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "golinedown", name: "golinedown",
bindKey: bindKey("Down", "Down|Ctrl-N"), bindKey: bindKey("Down", "Down|Ctrl-N"),
exec: function(env, args, request) { env.editor.navigateDown(args.times); } exec: function(env, args, request) { env.editor.navigateDown(args.times); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectwordleft", name: "selectwordleft",
bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
exec: function(env, args, request) { env.editor.getSelection().selectWordLeft(); } exec: function(env, args, request) { env.editor.getSelection().selectWordLeft(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotowordleft", name: "gotowordleft",
bindKey: bindKey("Ctrl-Left", "Option-Left"), bindKey: bindKey("Ctrl-Left", "Option-Left"),
exec: function(env, args, request) { env.editor.navigateWordLeft(); } exec: function(env, args, request) { env.editor.navigateWordLeft(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selecttolinestart", name: "selecttolinestart",
bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"), bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); } exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotolinestart", name: "gotolinestart",
bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
exec: function(env, args, request) { env.editor.navigateLineStart(); } exec: function(env, args, request) { env.editor.navigateLineStart(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectleft", name: "selectleft",
bindKey: bindKey("Shift-Left", "Shift-Left"), bindKey: bindKey("Shift-Left", "Shift-Left"),
exec: function(env, args, request) { env.editor.getSelection().selectLeft(); } exec: function(env, args, request) { env.editor.getSelection().selectLeft(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotoleft", name: "gotoleft",
bindKey: bindKey("Left", "Left|Ctrl-B"), bindKey: bindKey("Left", "Left|Ctrl-B"),
exec: function(env, args, request) { env.editor.navigateLeft(args.times); } exec: function(env, args, request) { env.editor.navigateLeft(args.times); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectwordright", name: "selectwordright",
bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
exec: function(env, args, request) { env.editor.getSelection().selectWordRight(); } exec: function(env, args, request) { env.editor.getSelection().selectWordRight(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotowordright", name: "gotowordright",
bindKey: bindKey("Ctrl-Right", "Option-Right"), bindKey: bindKey("Ctrl-Right", "Option-Right"),
exec: function(env, args, request) { env.editor.navigateWordRight(); } exec: function(env, args, request) { env.editor.navigateWordRight(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selecttolineend", name: "selecttolineend",
bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"), bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); } exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotolineend", name: "gotolineend",
bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
exec: function(env, args, request) { env.editor.navigateLineEnd(); } exec: function(env, args, request) { env.editor.navigateLineEnd(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectright", name: "selectright",
bindKey: bindKey("Shift-Right", "Shift-Right"), bindKey: bindKey("Shift-Right", "Shift-Right"),
exec: function(env, args, request) { env.editor.getSelection().selectRight(); } exec: function(env, args, request) { env.editor.getSelection().selectRight(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotoright", name: "gotoright",
bindKey: bindKey("Right", "Right|Ctrl-F"), bindKey: bindKey("Right", "Right|Ctrl-F"),
exec: function(env, args, request) { env.editor.navigateRight(args.times); } exec: function(env, args, request) { env.editor.navigateRight(args.times); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectpagedown", name: "selectpagedown",
bindKey: bindKey("Shift-PageDown", "Shift-PageDown"), bindKey: bindKey("Shift-PageDown", "Shift-PageDown"),
exec: function(env, args, request) { env.editor.selectPageDown(); } exec: function(env, args, request) { env.editor.selectPageDown(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "pagedown", name: "pagedown",
bindKey: bindKey(null, "PageDown"), bindKey: bindKey(null, "PageDown"),
exec: function(env, args, request) { env.editor.scrollPageDown(); } exec: function(env, args, request) { env.editor.scrollPageDown(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotopagedown", name: "gotopagedown",
bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"), bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"),
exec: function(env, args, request) { env.editor.gotoPageDown(); } exec: function(env, args, request) { env.editor.gotoPageDown(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectpageup", name: "selectpageup",
bindKey: bindKey("Shift-PageUp", "Shift-PageUp"), bindKey: bindKey("Shift-PageUp", "Shift-PageUp"),
exec: function(env, args, request) { env.editor.selectPageUp(); } exec: function(env, args, request) { env.editor.selectPageUp(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "pageup", name: "pageup",
bindKey: bindKey(null, "PageUp"), bindKey: bindKey(null, "PageUp"),
exec: function(env, args, request) { env.editor.scrollPageUp(); } exec: function(env, args, request) { env.editor.scrollPageUp(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "gotopageup", name: "gotopageup",
bindKey: bindKey("PageUp", "Option-PageUp"), bindKey: bindKey("PageUp", "Option-PageUp"),
exec: function(env, args, request) { env.editor.gotoPageUp(); } exec: function(env, args, request) { env.editor.gotoPageUp(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectlinestart", name: "selectlinestart",
bindKey: bindKey("Shift-Home", "Shift-Home"), bindKey: bindKey("Shift-Home", "Shift-Home"),
exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); } exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "selectlineend", name: "selectlineend",
bindKey: bindKey("Shift-End", "Shift-End"), bindKey: bindKey("Shift-End", "Shift-End"),
exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); } exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "del", name: "del",
bindKey: bindKey("Delete", "Delete|Ctrl-D"), bindKey: bindKey("Delete", "Delete|Ctrl-D"),
exec: function(env, args, request) { env.editor.removeRight(); } exec: function(env, args, request) { env.editor.removeRight(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "backspace", name: "backspace",
bindKey: bindKey( bindKey: bindKey(
"Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace", "Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace",
@ -351,53 +351,53 @@ exports.startup = function() {
), ),
exec: function(env, args, request) { env.editor.removeLeft(); } exec: function(env, args, request) { env.editor.removeLeft(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "removetolinestart", name: "removetolinestart",
bindKey: bindKey(null, "Option-Backspace"), bindKey: bindKey(null, "Option-Backspace"),
exec: function(env, args, request) { env.editor.removeToLineStart(); } exec: function(env, args, request) { env.editor.removeToLineStart(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "removetolineend", name: "removetolineend",
bindKey: bindKey(null, "Ctrl-K"), bindKey: bindKey(null, "Ctrl-K"),
exec: function(env, args, request) { env.editor.removeToLineEnd(); } exec: function(env, args, request) { env.editor.removeToLineEnd(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "removewordleft", name: "removewordleft",
bindKey: bindKey(null, "Alt-Backspace|Ctrl-Alt-Backspace"), bindKey: bindKey(null, "Alt-Backspace|Ctrl-Alt-Backspace"),
exec: function(env, args, request) { env.editor.removeWordLeft(); } exec: function(env, args, request) { env.editor.removeWordLeft(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "removewordright", name: "removewordright",
bindKey: bindKey(null, "Alt-Delete"), bindKey: bindKey(null, "Alt-Delete"),
exec: function(env, args, request) { env.editor.removeWordRight(); } exec: function(env, args, request) { env.editor.removeWordRight(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "outdent", name: "outdent",
bindKey: bindKey("Shift-Tab", "Shift-Tab"), bindKey: bindKey("Shift-Tab", "Shift-Tab"),
exec: function(env, args, request) { env.editor.blockOutdent(); } exec: function(env, args, request) { env.editor.blockOutdent(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "indent", name: "indent",
bindKey: bindKey("Tab", "Tab"), bindKey: bindKey("Tab", "Tab"),
exec: function(env, args, request) { env.editor.indent(); } exec: function(env, args, request) { env.editor.indent(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "inserttext", name: "inserttext",
exec: function(env, args, request) { exec: function(env, args, request) {
env.editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); env.editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
} }
}); });
canon.addCommand({ gcli.addCommand({
name: "centerselection", name: "centerselection",
bindKey: bindKey("Ctrl-L", "Ctrl-L"), bindKey: bindKey("Ctrl-L", "Ctrl-L"),
exec: function(env, args, request) { env.editor.centerSelection(); } exec: function(env, args, request) { env.editor.centerSelection(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "splitline", name: "splitline",
bindKey: bindKey(null, "Ctrl-O"), bindKey: bindKey(null, "Ctrl-O"),
exec: function(env, args, request) { env.editor.splitLine(); } exec: function(env, args, request) { env.editor.splitLine(); }
}); });
canon.addCommand({ gcli.addCommand({
name: "transposeletters", name: "transposeletters",
bindKey: bindKey("Ctrl-T", "Ctrl-T"), bindKey: bindKey("Ctrl-T", "Ctrl-T"),
exec: function(env, args, request) { env.editor.transposeLetters(); } exec: function(env, args, request) { env.editor.transposeLetters(); }

View file

@ -38,7 +38,7 @@
define(function(require, exports, module) { define(function(require, exports, module) {
var canon = require('cockpit/canon'); var gcli = require('cockpit/index');
var pref = { var pref = {
metadata: { metadata: {
@ -57,7 +57,7 @@ var pref = {
] ]
}, },
show: function(filter) { show: function(filter) {
var names = canon.getEnvironment().settings.getSettingNames(); var names = gcli.getEnvironment().settings.getSettingNames();
// first sort the settingsList based on the name // first sort the settingsList based on the name
names.sort(function(name1, name2) { names.sort(function(name1, name2) {
return name1.localeCompare(name2); return name1.localeCompare(name2);
@ -73,7 +73,7 @@ var pref = {
return; return;
} }
var setting = canon.getEnvironment().settings.getSetting(name); var setting = gcli.getEnvironment().settings.getSetting(name);
var url = 'https://wiki.mozilla.org/Labs/Skywriter/Settings#' + var url = 'https://wiki.mozilla.org/Labs/Skywriter/Settings#' +
setting.name; setting.name;
html += '<a class="setting" href="' + url + html += '<a class="setting" href="' + url +
@ -86,7 +86,7 @@ var pref = {
'<br/>'; '<br/>';
}); });
canon.getRequest().done(html); gcli.getRequest().done(html);
}, },
setMetadata: { setMetadata: {
@ -106,7 +106,7 @@ var pref = {
}, },
set: function(setting, value) { set: function(setting, value) {
setting.set(value); setting.set(value);
canon.getRequest().done('Setting: <strong>' + setting.name + gcli.getRequest().done('Setting: <strong>' + setting.name +
'</strong> = ' + setting.get()); '</strong> = ' + setting.get());
}, },
@ -128,11 +128,11 @@ var pref = {
exports.startup = function() { exports.startup = function() {
canon.addCommands(pref, 'pref'); gcli.addCommands(pref, 'pref');
}; };
exports.shutdown = function() { exports.shutdown = function() {
canon.removeCommands(pref, 'pref'); gcli.removeCommands(pref, 'pref');
}; };

View file

@ -77,7 +77,7 @@ var KeyBinding = function(editor) {
if (!toExecute || !toExecute.command) { if (!toExecute || !toExecute.command) {
if (hashId != 0 || keyCode != 0) { if (hashId != 0 || keyCode != 0) {
toExecute = { toExecute = {
command: canon.findKeyCommand(env, "editor", hashId, keyOrText) command: findKeyCommand(env, "editor", hashId, keyOrText)
}; };
} else { } else {
toExecute = { toExecute = {

View file

@ -47,8 +47,8 @@ var oop = require('pilot/oop');
var types = require('cockpit/types'); var types = require('cockpit/types');
var EventEmitter = require('pilot/event_emitter').EventEmitter; var EventEmitter = require('pilot/event_emitter').EventEmitter;
var SelectionType = require('cockpit/basic').SelectionType; var SelectionType = require('cockpit/types').SelectionType;
var DeferredType = require('cockpit/basic').DeferredType; var DeferredType = require('cockpit/types').DeferredType;
var Argument = require('cockpit/argument').Argument; var Argument = require('cockpit/argument').Argument;

@ -1 +1 @@
Subproject commit ebd56b41a28bb28805ae92b3d2356fdbed3a49c9 Subproject commit 0e058cf3098129419a7678e20ccf011aee3e2fdc