mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 20:44:11 +01:00
Merge default.
--HG-- branch : key-processing
This commit is contained in:
@@ -302,7 +302,7 @@ var AddonList = Class("AddonList", {
|
||||
if (addon && addon.id in this.addons)
|
||||
this.addons[addon.id].update();
|
||||
if (this.ready)
|
||||
this.modules.mow.resize(false);
|
||||
this.modules.commandline.updateOutputHeight(false);
|
||||
},
|
||||
|
||||
onDisabled: function (addon) { this.update(addon); },
|
||||
|
||||
@@ -658,7 +658,7 @@ function Class() {
|
||||
|
||||
var Constructor = eval(String.replace(<![CDATA[
|
||||
(function constructor() {
|
||||
let self = Object.create(Constructor.prototype, {
|
||||
var self = Object.create(Constructor.prototype, {
|
||||
constructor: { value: Constructor },
|
||||
});
|
||||
self.instance = self;
|
||||
|
||||
@@ -868,10 +868,15 @@ var Completion = Module("completion", {
|
||||
context = context.contexts["/list"];
|
||||
context.wait();
|
||||
|
||||
let contexts = context.contextList.filter(function (c) c.hasItems && c.items.length);
|
||||
if (!contexts.length)
|
||||
contexts = context.contextList.filter(function (c) c.hasItems).slice(0, 1);
|
||||
if (!contexts.length)
|
||||
contexts = context.contextList.slice(-1);
|
||||
|
||||
modules.commandline.commandOutput(
|
||||
<div highlight="Completions">
|
||||
{ template.map(context.contextList.filter(function (c) c.hasItems && c.items.length),
|
||||
function (context)
|
||||
{ template.map(contexts, function (context)
|
||||
template.completionRow(context.title, "CompTitle") +
|
||||
template.map(context.items, function (item) context.createRow(item), null, 100)) }
|
||||
</div>);
|
||||
|
||||
@@ -296,7 +296,7 @@ var DownloadList = Class("DownloadList",
|
||||
else {
|
||||
this.addDownload(download.id);
|
||||
|
||||
this.modules.mow.resize(false);
|
||||
this.modules.commandline.updateOutputHeight(false);
|
||||
this.nodes.list.scrollIntoView(false);
|
||||
}
|
||||
this.update();
|
||||
|
||||
@@ -1344,13 +1344,16 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
});
|
||||
},
|
||||
|
||||
maxErrors: 15,
|
||||
errorCount: 0,
|
||||
errors: Class.memoize(function () []),
|
||||
maxErrors: 15,
|
||||
reportError: function (error) {
|
||||
if (Cu.reportError)
|
||||
Cu.reportError(error);
|
||||
|
||||
try {
|
||||
this.errorCount++;
|
||||
|
||||
let obj = update({}, error, {
|
||||
toString: function () String(error),
|
||||
stack: <>{util.stackLines(String(error.stack || Error().stack)).join("\n").replace(/^/mg, "\t")}</>
|
||||
|
||||
Reference in New Issue
Block a user