mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 22:37:58 +01:00
Merge branch 'master' into xulmus
This commit is contained in:
@@ -147,13 +147,13 @@ function Buffer() //{{{
|
|||||||
getter: function () window.fullScreen
|
getter: function () window.fullScreen
|
||||||
});
|
});
|
||||||
|
|
||||||
options.add(["nextpattern"],
|
options.add(["nextpattern"], // \u00BB is » (>> in a single char)
|
||||||
"Patterns to use when guessing the 'next' page in a document sequence",
|
"Patterns to use when guessing the 'next' page in a document sequence",
|
||||||
"stringlist", "\\bnext\\b,^>$,^(>>|»)$,^(>|»),(>|»)$,\\bmore\\b");
|
"stringlist", "\\bnext\\b,^>$,^(>>|\u00BB)$,^(>|\u00BB),(>|\u00BB)$,\\bmore\\b");
|
||||||
|
|
||||||
options.add(["previouspattern"],
|
options.add(["previouspattern"], // \u00AB is « (<< in a single char)
|
||||||
"Patterns to use when guessing the 'previous' page in a document sequence",
|
"Patterns to use when guessing the 'previous' page in a document sequence",
|
||||||
"stringlist", "\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$");
|
"stringlist", "\\bprev|previous\\b,^<$,^(<<|\u00AB)$,^(<|\u00AB),(<|\u00AB)$");
|
||||||
|
|
||||||
options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm",
|
options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1298,15 +1298,8 @@ function CommandLine() //{{{
|
|||||||
// user pressed ENTER to carry out a command
|
// user pressed ENTER to carry out a command
|
||||||
// user pressing ESCAPE is handled in the global onEscape
|
// user pressing ESCAPE is handled in the global onEscape
|
||||||
// FIXME: <Esc> should trigger "cancel" event
|
// FIXME: <Esc> should trigger "cancel" event
|
||||||
// FIXME: This should not be waiting, some kind of callback mechanism on completion would be better.
|
|
||||||
if (events.isAcceptKey(key))
|
if (events.isAcceptKey(key))
|
||||||
{
|
{
|
||||||
while (completions.context.incomplete)
|
|
||||||
{
|
|
||||||
liberator.threadYield(true);
|
|
||||||
command = this.command;
|
|
||||||
}
|
|
||||||
|
|
||||||
let mode = currentExtendedMode; // save it here, as modes.pop() resets it
|
let mode = currentExtendedMode; // save it here, as modes.pop() resets it
|
||||||
keepCommand = true;
|
keepCommand = true;
|
||||||
currentExtendedMode = null; // Don't let modes.pop trigger "cancel"
|
currentExtendedMode = null; // Don't let modes.pop trigger "cancel"
|
||||||
|
|||||||
@@ -249,6 +249,40 @@ const util = { //{{{
|
|||||||
return delimiter + str.replace(/([\\'"])/g, "\\$1").replace("\n", "\\n", "g").replace("\t", "\\t", "g") + delimiter;
|
return delimiter + str.replace(/([\\'"])/g, "\\$1").replace("\n", "\\n", "g").replace("\t", "\\t", "g") + delimiter;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Split a string on literal occurances of a marker.
|
||||||
|
*
|
||||||
|
* Specifically this ignores occurences preceded by a backslash, or
|
||||||
|
* contained within 'single' or "double" quotes.
|
||||||
|
*
|
||||||
|
* It assumes backslash escaping on strings, and will thus not count quotes
|
||||||
|
* that are preceded by a backslash or within other quotes as starting or
|
||||||
|
* ending quoted sections of the string.
|
||||||
|
*
|
||||||
|
* @param {string} str
|
||||||
|
* @param {RegExp} marker
|
||||||
|
*/
|
||||||
|
splitLiteral: function splitLiteral(str, marker)
|
||||||
|
{
|
||||||
|
let results = [];
|
||||||
|
let resep = RegExp(/^(([^\\'"]|\\.|'([^\\']|\\.)*'|"([^\\"]|\\.)*")*?)/.source + marker.source);
|
||||||
|
let cont = true;
|
||||||
|
|
||||||
|
while (cont)
|
||||||
|
{
|
||||||
|
cont = false;
|
||||||
|
str = str.replace(resep, function (match, before)
|
||||||
|
{
|
||||||
|
results.push(before);
|
||||||
|
cont = true;
|
||||||
|
return "";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
results.push(str);
|
||||||
|
return results;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts <b>bytes</b> to a pretty printed data size string.
|
* Converts <b>bytes</b> to a pretty printed data size string.
|
||||||
*
|
*
|
||||||
@@ -618,7 +652,7 @@ const util = { //{{{
|
|||||||
*/
|
*/
|
||||||
stringToURLArray: function stringToURLArray(str)
|
stringToURLArray: function stringToURLArray(str)
|
||||||
{
|
{
|
||||||
let urls = str.split(RegExp("\\s*" + options["urlseparator"] + "\\s*"));
|
let urls = util.splitLiteral(str, RegExp("\\s*" + options["urlseparator"] + "\\s*"));
|
||||||
|
|
||||||
return urls.map(function (url) {
|
return urls.map(function (url) {
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<Description>
|
<Description>
|
||||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||||
<em:minVersion>3.0</em:minVersion>
|
<em:minVersion>3.0</em:minVersion>
|
||||||
<em:maxVersion>3.2a1pre</em:maxVersion>
|
<em:maxVersion>3.6a1pre</em:maxVersion>
|
||||||
</Description>
|
</Description>
|
||||||
</em:targetApplication>
|
</em:targetApplication>
|
||||||
</Description>
|
</Description>
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ ________________________________________________________________________________
|
|||||||
section:Navigating[navigating]
|
section:Navigating[navigating]
|
||||||
|
|
||||||
|H| |<C-o>| |CTRL-O| |:ba| |:back|
|
|H| |<C-o>| |CTRL-O| |:ba| |:back|
|
||||||
||:[count]ba[ck] [url]|| +
|
||:[count]ba[ck] [a][url][a]|| +
|
||||||
||:ba[ck]!|| +
|
||:ba[ck]!|| +
|
||||||
||CTRL-o||
|
||CTRL-o||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
@@ -171,7 +171,7 @@ ________________________________________________________________________________
|
|||||||
|
|
||||||
|
|
||||||
|L| |<C-i>| |CTRL-i| |:fo| |:fw| |:forward|
|
|L| |<C-i>| |CTRL-i| |:fo| |:fw| |:forward|
|
||||||
||:[count]fo[rward] [url]|| +
|
||:[count]fo[rward] [a][url][a]|| +
|
||||||
||:fo[rward]!|| +
|
||:fo[rward]!|| +
|
||||||
||CTRL-i||
|
||CTRL-i||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|||||||
Reference in New Issue
Block a user