1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 10:05: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:
Kris Maglione
2008-10-08 02:56:11 +00:00
parent 02c1d2fbdf
commit 10376ecb77
12 changed files with 168 additions and 90 deletions

View File

@@ -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);
}