diff --git a/common/content/services.js b/common/content/services.js index b9c7edc3..2e318c9d 100644 --- a/common/content/services.js +++ b/common/content/services.js @@ -32,7 +32,11 @@ function Services() ifaces.forEach(function (iface) res.QueryInterface(iface)); return res; } - catch (e) {} + catch (e) + { + // liberator.log() is not defined at this time, so just dump any error + dump("Service creation failed for '" + classes + "': " + e); + } } const self = { @@ -86,7 +90,7 @@ function Services() }; self.add("appStartup", "@mozilla.org/toolkit/app-startup;1", Ci.nsIAppStartup); - self.add("autoCompleteSearch", "@mozilla.org/browser/global-history;2", Ci.nsIAutoCompleteSearch); + self.add("autoCompleteSearch", "@mozilla.org/autocomplete/search;1?name=history", Ci.nsIAutoCompleteSearch); self.add("browserSearch", "@mozilla.org/browser/search-service;1", Ci.nsIBrowserSearchService); self.add("cache", "@mozilla.org/network/cache-service;1", Ci.nsICacheService); self.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=liberator", Ci.nsICommandLineHandler); diff --git a/common/content/ui.js b/common/content/ui.js index bf3e08df..ad138466 100755 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -402,28 +402,11 @@ function CommandLine() //{{{ { function done() !(idx >= n + context.items.length || idx == -2 && !context.items.length); while (context.incomplete && !done()) - // threadYield(true, true) would be better, but it does not return on my - // machine until all awesomebar completions were reported, making - // :open foo nearly unusable, if the first 2 foo-completions would - // be there fast, but it takes up to 20 sec to find more foo-completions - // - // The strange thing is, I tested the 2009-01-07 nightly at work in Windows - // and it seemed to work perfectly there. Will have to see if it's a - // hardware (dual core there, vs. P4 at home) issue or an OS issue. - // - // While I *really* prefer this solution over my hack - // when it works, we can't have a nearly-defect :open - // prompt when releasing vimp 2.0, even not just on certain - // computers, as :open is probably the most often used ex-command - // in vimperator - // - // liberator.threadYield(false, true); is just a temporary measure as - // it has other problems (hitting tab often in a row), until we find the - // source of the problem (which we hopefully do, as I really don't want to - // have to revert to my hack when better solutions exist) liberator.threadYield(false, true); + if (done()) break; + n += context.items.length; } } diff --git a/vimperator/Donors b/vimperator/Donors index 5017c3c0..238ec896 100644 --- a/vimperator/Donors +++ b/vimperator/Donors @@ -2,6 +2,8 @@ Continuous donations: * Daniel Bainton (web hosting) 2009: +* Norio Sugimoto +* Catatonic Recording * Wataru Inoue (first one donating via addons.mozilla.org) * Krishnakumar Subramanian * Natan Zohar diff --git a/vimperator/content/config.js b/vimperator/content/config.js index 84ca9fed..fd75ada3 100644 --- a/vimperator/content/config.js +++ b/vimperator/content/config.js @@ -324,6 +324,7 @@ const config = { //{{{ ////////////////////// COMPLETIONS ///////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ + var searchRunning = false; // only until Firefox fixes https://bugzilla.mozilla.org/show_bug.cgi?id=510589 completion.location = function location(context) { if (!services.get("autoCompleteSearch")) return; @@ -334,7 +335,7 @@ const config = { //{{{ context.incomplete = true; context.hasItems = context.completions.length > 0; // XXX context.filterFunc = null; - context.cancel = function () services.get("autoCompleteSearch").stopSearch(); + context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } }; context.compare = CompletionContext.Sort.unsorted; let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; @@ -343,13 +344,17 @@ const config = { //{{{ for (i in util.range(0, result.matchCount)) ]; }); - services.get("autoCompleteSearch").stopSearch(); + if (searchRunning) + services.get("autoCompleteSearch").stopSearch(); + searchRunning = true; services.get("autoCompleteSearch").startSearch(context.filter, "", context.result, { onSearchResult: function onSearchResult(search, result) { - context.result = result; timer.tell(result); if (result.searchResult <= result.RESULT_SUCCESS) + { + searchRunning = false; timer.flush(); + } } }); }; diff --git a/vimperator/install.rdf b/vimperator/install.rdf index b1abea82..a321aca2 100644 --- a/vimperator/install.rdf +++ b/vimperator/install.rdf @@ -19,7 +19,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 3.0 - 3.6a1pre + 3.6a2pre