mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-26 22:11:27 +02:00
renamed completion.exTabCompletion() completion.ex()
This commit is contained in:
@@ -568,9 +568,8 @@ liberator.Completion = function () //{{{
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// FIXME: rename
|
// provides completions for ex commands, including their arguments
|
||||||
// TODO: get completions for "nested" command lines like ":time :js <tab>" or ":tab :he<tab>"
|
ex: function (str)
|
||||||
exTabCompletion: function (str)
|
|
||||||
{
|
{
|
||||||
substrings = [];
|
substrings = [];
|
||||||
var [count, cmd, special, args] = liberator.commands.parseCommand(str);
|
var [count, cmd, special, args] = liberator.commands.parseCommand(str);
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ const liberator = (function () //{{{
|
|||||||
completer: function (filter)
|
completer: function (filter)
|
||||||
{
|
{
|
||||||
if (/^:/.test(filter))
|
if (/^:/.test(filter))
|
||||||
return liberator.completion.exTabCompletion(filter);
|
return liberator.completion.ex(filter);
|
||||||
else
|
else
|
||||||
return liberator.completion.javascript(filter);
|
return liberator.completion.javascript(filter);
|
||||||
}
|
}
|
||||||
@@ -859,7 +859,7 @@ const liberator = (function () //{{{
|
|||||||
|
|
||||||
// TODO: move elsewhere
|
// TODO: move elsewhere
|
||||||
liberator.registerCallback("submit", liberator.modes.EX, function (command) { liberator.execute(command); });
|
liberator.registerCallback("submit", liberator.modes.EX, function (command) { liberator.execute(command); });
|
||||||
liberator.registerCallback("complete", liberator.modes.EX, function (str) { return liberator.completion.exTabCompletion(str); });
|
liberator.registerCallback("complete", liberator.modes.EX, function (str) { return liberator.completion.ex(str); });
|
||||||
|
|
||||||
// first time intro message
|
// first time intro message
|
||||||
if (liberator.options.getPref("extensions." + liberator.config.name.toLowerCase() + ".firsttime", true))
|
if (liberator.options.getPref("extensions." + liberator.config.name.toLowerCase() + ".firsttime", true))
|
||||||
|
|||||||
+3
-1
@@ -271,7 +271,9 @@ liberator.Tabs = function () //{{{
|
|||||||
liberator.execute(args);
|
liberator.execute(args);
|
||||||
liberator.forceNewTab = false;
|
liberator.forceNewTab = false;
|
||||||
},
|
},
|
||||||
{ completer: function (filter) { return liberator.completion.exTabCompletion(filter); } });
|
{
|
||||||
|
completer: function (filter) { return liberator.completion.ex(filter); }
|
||||||
|
});
|
||||||
|
|
||||||
liberator.commands.add(["tabl[ast]"],
|
liberator.commands.add(["tabl[ast]"],
|
||||||
"Switch to the last tab",
|
"Switch to the last tab",
|
||||||
|
|||||||
Reference in New Issue
Block a user