mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 18:37:58 +01:00
Fix completion preview error in 3.6a2
--HG-- extra : rebase_source : 33da194d4dc35758f42183b0969132289d9594cc
This commit is contained in:
@@ -1240,7 +1240,6 @@ const liberator = (function () //{{{
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
// String
|
||||
else if (matches = string.match(/^(['"])([^\1]*?[^\\]?)\1/))
|
||||
{
|
||||
@@ -1249,7 +1248,6 @@ const liberator = (function () //{{{
|
||||
else
|
||||
return void this.echoerr("E115: Missing quote: " + string);
|
||||
}
|
||||
|
||||
// Number
|
||||
else if (matches = string.match(/^(\d+)$/))
|
||||
return parseInt(matches[1], 10);
|
||||
@@ -1659,9 +1657,16 @@ const liberator = (function () //{{{
|
||||
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
var string = String(error);
|
||||
var stack = error.stack;
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
let obj = {
|
||||
toString: function () error.toString(),
|
||||
stack: <>{(error.stack || Error().stack).replace(/^/mg, "\t")}</>
|
||||
toString: function () string || {}.toString.call(error),
|
||||
stack: <>{String.replace(stack || Error().stack, /^/mg, "\t")}</>
|
||||
};
|
||||
for (let [k, v] in Iterator(error))
|
||||
{
|
||||
@@ -1674,6 +1679,7 @@ const liberator = (function () //{{{
|
||||
errors.toString = function () [String(v[0]) + "\n" + v[1] for ([k, v] in this)].join("\n\n");
|
||||
errors.push([new Date, obj + obj.stack]);
|
||||
}
|
||||
liberator.dump(string);
|
||||
liberator.dump(obj);
|
||||
liberator.dump("");
|
||||
}
|
||||
|
||||
@@ -360,7 +360,16 @@ function CommandLine() //{{{
|
||||
{
|
||||
let node = this.editor.rootElement.firstChild;
|
||||
if (node && node.nextSibling)
|
||||
this.editor.deleteNode(node.nextSibling);
|
||||
{
|
||||
try
|
||||
{
|
||||
this.editor.deleteNode(node.nextSibling);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
node.nextSibling.textContent = "";
|
||||
}
|
||||
}
|
||||
else if (this.removeSubstring)
|
||||
{
|
||||
let str = this.removeSubstring;
|
||||
|
||||
@@ -474,15 +474,22 @@ const util = { //{{{
|
||||
return ns + ":" + node.localName;
|
||||
return node.localName.toLowerCase();
|
||||
}
|
||||
let tag = "<" + [namespaced(elem)].concat(
|
||||
[namespaced(a) + "=" + template.highlight(a.value, true)
|
||||
for ([i, a] in util.Array.iteritems(elem.attributes))]).join(" ");
|
||||
try
|
||||
{
|
||||
let tag = "<" + [namespaced(elem)].concat(
|
||||
[namespaced(a) + "=" + template.highlight(a.value, true)
|
||||
for ([i, a] in util.Array.iteritems(elem.attributes))]).join(" ");
|
||||
|
||||
if (!elem.firstChild || /^\s*$/.test(elem.firstChild) && !elem.firstChild.nextSibling)
|
||||
tag += '/>';
|
||||
else
|
||||
tag += '>...</' + namespaced(elem) + '>';
|
||||
return tag;
|
||||
if (!elem.firstChild || /^\s*$/.test(elem.firstChild) && !elem.firstChild.nextSibling)
|
||||
tag += '/>';
|
||||
else
|
||||
tag += '>...</' + namespaced(elem) + '>';
|
||||
return tag;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
return {}.toString.call(elem);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user