From 855bc5b9fe26ad0a4d4734ed64fe965af51ed2bb Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Wed, 18 Mar 2009 22:39:32 +0200 Subject: [PATCH 1/5] Revert "Fix bug #189, now uses first completion" This reverts commit f18efe4ec792afb65c4bace11073526aef31725e. --- common/content/ui.js | 7 ------- 1 file changed, 7 deletions(-) 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" From f82ca27c6e09204ce90b39bf75a7d120ca4da3cd Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Mon, 23 Mar 2009 11:30:01 +0200 Subject: [PATCH 2/5] Update maxVersion of vimperator to latest Minefield --- vimperator/install.rdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From b4b62fc8360a51d000313fc18be2ac5ad645bfa9 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 23 Mar 2009 12:36:05 +0000 Subject: [PATCH 3/5] Fix #141 by not splitting URLs on quoted commas. Added a new function util.splitLiteral(str, RegExp). --- common/content/util.js | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) 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 From 53b5a54a1f5ea96d4e013ddaec41ec410291deb3 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 23 Mar 2009 14:41:41 +0000 Subject: [PATCH 4/5] Fix #198, Unicode escape next and previous pattern --- common/content/buffer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 458daa21..4cd9fdeb 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -146,13 +146,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", { From b6cb5785adbef0cb7bef5d74d7b36176e6679a74 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 24 Mar 2009 15:02:56 +1100 Subject: [PATCH 5/5] Fix :help :back/:forward formatting. --- vimperator/locale/en-US/browsing.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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|| ________________________________________________________________________________