mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-14 10:55:47 +01:00
Add search keyword-history completion (try typing a keyword), better JS completion, better errors in :so, check "preload" before preloading history/bookmarks, Object/Function highlighting, some other bug fixes.
This commit is contained in:
@@ -763,12 +763,22 @@ lookup:
|
||||
// handle pure javascript files specially
|
||||
if (/\.js$/.test(filename))
|
||||
{
|
||||
liberator.eval(str);
|
||||
var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
|
||||
.getService(Components.interfaces.mozIJSSubScriptLoader);
|
||||
try
|
||||
{
|
||||
loader.loadSubScript("file://" + file.path, liberator)
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
e.echoerr = file.path + ":" + e.lineNumber + ": " + e;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
else if (/\.css$/.test(filename))
|
||||
{
|
||||
liberator.storage.styles.unregisterSheet("file://" + file.path);
|
||||
liberator.storage.styles.registerSheet("file://" + file.path);
|
||||
liberator.storage.styles.registerSheet("file://" + file.path, !silent);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -858,9 +868,9 @@ lookup:
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
let message = "Sourcing file: " + file.path + ": " + e;
|
||||
let message = "Sourcing file: " + (e.echoerr || file.path + ": " + e);
|
||||
if (Components.utils.reportError)
|
||||
Components.utils.reportError(message);
|
||||
Components.utils.reportError(e);
|
||||
if (!silent)
|
||||
liberator.echoerr(message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user