mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-04 03:35:47 +01:00
Fix bug.
This commit is contained in:
@@ -441,7 +441,12 @@ var CommandExMode = Class("CommandExMode", CommandMode, {
|
|||||||
prompt: ["Normal", ":"],
|
prompt: ["Normal", ":"],
|
||||||
|
|
||||||
complete: function CEM_complete(context) {
|
complete: function CEM_complete(context) {
|
||||||
context.fork("ex", 0, completion, "ex");
|
try {
|
||||||
|
context.fork("ex", 0, completion, "ex");
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
context.message = _("error.error", e);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onSubmit: function CEM_onSubmit(command) {
|
onSubmit: function CEM_onSubmit(command) {
|
||||||
@@ -945,7 +950,7 @@ var CommandLine = Module("commandline", {
|
|||||||
dactyl.trapErrors(function () {
|
dactyl.trapErrors(function () {
|
||||||
this.store.push({ value: str, timestamp: Date.now()*1000, privateData: this.checkPrivate(str) });
|
this.store.push({ value: str, timestamp: Date.now()*1000, privateData: this.checkPrivate(str) });
|
||||||
}, this);
|
}, this);
|
||||||
this.store = this.store.slice(this.store.length - options["history"]);
|
this.store = this.store.slice(Math.max(0, this.store.length - options["history"]));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @property {function} Returns whether a data item should be
|
* @property {function} Returns whether a data item should be
|
||||||
|
|||||||
Reference in New Issue
Block a user