mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 06:58:00 +01:00
Add $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT, ~/.vimperator/info/{profile}.
This commit is contained in:
@@ -675,17 +675,10 @@ function Completion() //{{{
|
||||
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
try
|
||||
{
|
||||
var completionService = Cc["@mozilla.org/browser/global-history;2"].getService(Ci.nsIAutoCompleteSearch);
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
const EVAL_TMP = "__liberator_eval_tmp";
|
||||
|
||||
function Javascript()
|
||||
{
|
||||
let json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
|
||||
const OFFSET = 0, CHAR = 1, STATEMENTS = 2, DOTS = 3, FULL_STATEMENTS = 4, COMMA = 5, FUNCTIONS = 6;
|
||||
let stack = [];
|
||||
let functions = [];
|
||||
@@ -1558,7 +1551,7 @@ function Completion() //{{{
|
||||
|
||||
location: function location(context)
|
||||
{
|
||||
if (!completionService)
|
||||
if (!service["autoCompleteSearch"])
|
||||
return
|
||||
context.anchored = false;
|
||||
context.title = ["Smart Completions"];
|
||||
@@ -1574,8 +1567,8 @@ function Completion() //{{{
|
||||
for (i in util.range(0, result.matchCount))
|
||||
];
|
||||
});
|
||||
completionService.stopSearch();
|
||||
completionService.startSearch(context.filter, "", context.result, {
|
||||
service["autoCompleteSearch"].stopSearch();
|
||||
service["autoCompleteSearch"].startSearch(context.filter, "", context.result, {
|
||||
onSearchResult: function onSearchResult(search, result)
|
||||
{
|
||||
context.result = result;
|
||||
@@ -1655,11 +1648,10 @@ function Completion() //{{{
|
||||
|
||||
preference: function preference(context)
|
||||
{
|
||||
let prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
|
||||
context.anchored = false;
|
||||
context.title = ["Firefox Preference", "Value"];
|
||||
context.keys = { text: function (item) item, description: function (item) options.getPref(item) };
|
||||
context.completions = prefs.getChildList("", { value: 0 });
|
||||
context.completions = service["prefs"].getChildList("", { value: 0 });
|
||||
},
|
||||
|
||||
search: function search(context, noSuggest)
|
||||
@@ -1706,12 +1698,11 @@ function Completion() //{{{
|
||||
if (!context.filter)
|
||||
return;
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
|
||||
let engineList = (engineAliases || options["suggestengines"] || "google").split(",");
|
||||
|
||||
let completions = [];
|
||||
engineList.forEach(function (name) {
|
||||
let engine = ss.getEngineByAlias(name);
|
||||
let engine = service["browserSearch"].getEngineByAlias(name);
|
||||
if (!engine)
|
||||
return;
|
||||
let [,word] = /^\s*(\S+)/.exec(context.filter) || [];
|
||||
@@ -1734,9 +1725,7 @@ function Completion() //{{{
|
||||
context.title = ["Shell Command", "Path"];
|
||||
context.generate = function ()
|
||||
{
|
||||
const environmentService = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
|
||||
|
||||
let dirNames = environmentService.get("PATH").split(RegExp(liberator.has("Win32") ? ";" : ":"));
|
||||
let dirNames = service["environment"].get("PATH").split(RegExp(liberator.has("Win32") ? ";" : ":"));
|
||||
let commands = [];
|
||||
|
||||
for (let [,dirName] in Iterator(dirNames))
|
||||
|
||||
Reference in New Issue
Block a user