diff --git a/common/content/buffer.js b/common/content/buffer.js index 15b09ae0..3d64c1ed 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -147,13 +147,13 @@ function Buffer() //{{{ 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", - "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", - "stringlist", "\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$"); + "stringlist", "\\bprev|previous\\b,^<$,^(<<|\u00AB)$,^(<|\u00AB),(<|\u00AB)$"); options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm", { diff --git a/common/content/ui.js b/common/content/ui.js index a23e5de7..d01f2a2c 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1298,15 +1298,8 @@ function CommandLine() //{{{ // user pressed ENTER to carry out a command // user pressing ESCAPE is handled in the global onEscape // FIXME: should trigger "cancel" event - // FIXME: This should not be waiting, some kind of callback mechanism on completion would be better. 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 keepCommand = true; currentExtendedMode = null; // Don't let modes.pop trigger "cancel" diff --git a/common/content/util.js b/common/content/util.js index ad41bd18..8ea3d22a 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -249,6 +249,40 @@ const util = { //{{{ 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 bytes to a pretty printed data size string. * @@ -618,7 +652,7 @@ const util = { //{{{ */ 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) { try diff --git a/vimperator/install.rdf b/vimperator/install.rdf index e709b06d..0d203952 100644 --- a/vimperator/install.rdf +++ b/vimperator/install.rdf @@ -20,7 +20,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 3.0 - 3.2a1pre + 3.6a1pre diff --git a/vimperator/locale/en-US/browsing.txt b/vimperator/locale/en-US/browsing.txt index 9b44fa8a..c2a7dbba 100644 --- a/vimperator/locale/en-US/browsing.txt +++ b/vimperator/locale/en-US/browsing.txt @@ -160,7 +160,7 @@ ________________________________________________________________________________ section:Navigating[navigating] |H| || |CTRL-O| |:ba| |:back| -||:[count]ba[ck] [url]|| + +||:[count]ba[ck] [a][url][a]|| + ||:ba[ck]!|| + ||CTRL-o|| ________________________________________________________________________________ @@ -171,7 +171,7 @@ ________________________________________________________________________________ |L| || |CTRL-i| |:fo| |:fw| |:forward| -||:[count]fo[rward] [url]|| + +||:[count]fo[rward] [a][url][a]|| + ||:fo[rward]!|| + ||CTRL-i|| ________________________________________________________________________________