1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-22 23:45:45 +01:00

Fix minefield.

This commit is contained in:
Kris Maglione
2014-09-16 13:19:54 -07:00
parent 0f41b99a03
commit 3ab2fcf8e6
11 changed files with 24 additions and 23 deletions

View File

@@ -264,7 +264,7 @@ var Abbreviations = Module("abbreviations", {
* @optional
*/
list: function (modes, lhs, hives) {
let hives = (hives || this.userHives).filter(h => !h.empty);
hives = (hives || this.userHives).filter(h => !h.empty);
function abbrevs(hive)
hive.merged.filter(ab => (ab.inModes(modes) && ab.lhs.startsWith(lhs)));

View File

@@ -91,8 +91,7 @@ var AutoCommands = Module("autocommands", {
* @optional
*/
list: function (event, regexp, hives) {
let hives = hives || this.activeHives;
hives = hives || this.activeHives;
function cmds(hive) {
let cmds = {};

View File

@@ -1481,6 +1481,9 @@ var CommandLine = Module("commandline", {
if (cmd.substr(cmd.length - str.length) == str)
commandline.widgets.active.command.value = cmd.substr(0, cmd.length - str.length);
}
let e = this.editor.selection.focusNode;
if (e != this.editor.rootElement && e.parentNode != this.editor.rootElement)
this.editor.selection.getRangeAt(0).selectNodeContents(this.editor.rootElement);
delete this.removeSubstring;
},

View File

@@ -369,7 +369,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
args = { file: args };
args.file = args.file.path || args.file;
let args = options.get("editor").format(args);
args = options.get("editor").format(args);
dactyl.assert(args.length >= 1, _("option.notSet", "editor"));
@@ -1153,7 +1153,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
["<C-]>", "<C-5>"], "Expand Insert mode abbreviation",
function () { editor.expandAbbreviation(modes.INSERT); });
let bind = function bind(names, description, action, params)
bind = function bind(names, description, action, params)
mappings.add([modes.TEXT_EDIT], names, description,
action, update({ type: "editor" }, params));
@@ -1266,7 +1266,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
},
{ arg: true });
let bind = function bind(names, description, action, params)
bind = function bind(names, description, action, params)
mappings.add([modes.TEXT_EDIT, modes.OPERATOR, modes.VISUAL],
names, description,
action, update({ type: "editor" }, params));
@@ -1333,7 +1333,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
},
{ count: true });
let bind = function bind(...args) mappings.add.apply(mappings, [[modes.AUTOCOMPLETE]].concat(args));
bind = function bind(...args) mappings.add.apply(mappings, [[modes.AUTOCOMPLETE]].concat(args));
bind(["<Esc>"], "Return to Insert mode",
() => Events.PASS_THROUGH);

View File

@@ -1278,7 +1278,7 @@ var Hints = Module("hints", {
function ({ count }) { hints.open("g;", { continue: true, count: count }); },
{ count: true });
let bind = function bind(names, description, action, params)
bind = function bind(names, description, action, params)
mappings.add([modes.HINTS], names, description,
action, params);