From 102605556d31858eced69bdd16f412af42ef0c24 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 6 Jan 2009 23:12:51 -0500 Subject: [PATCH] Fix rapid succession when busy. Don't wait for all contexts to complete when processing --- common/content/completion.js | 9 ++++++- common/content/events.js | 2 +- common/content/liberator.xul | 1 + common/content/ui.js | 47 +++++++++++++++++++++++------------- 4 files changed, 40 insertions(+), 19 deletions(-) diff --git a/common/content/completion.js b/common/content/completion.js index c27734fc..21cce3d3 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -155,7 +155,9 @@ function CompletionContext(editor, name, offset) //{{{ /** * @property {Object} A map of all contexts, keyed on their names. * Names are assigned when a context is forked, with its specified - * name appended, after a '/', to its parent's name. + * name appended, after a '/', to its parent's name. May + * contain inactive contexts. For active contexts, see + * {@link #contextList}. */ this.contexts = { "/": this }; /** @@ -638,6 +640,11 @@ CompletionContext.prototype = { for (let type in this.selectionTypes) this.highlight(0, 0, type); + /** + * @property {[CompletionContext]} A list of active + * completion contexts, in the order in which they were + * instantiated. + */ this.contextList = []; this.offset = 0; this.process = []; diff --git a/common/content/events.js b/common/content/events.js index 8d132e56..0408e157 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1014,7 +1014,7 @@ function Events() //{{{ if (event.metaKey) modifier += "M-"; - if (event.type == "keypress") + if (/^key/.test(event.type)) { if (event.charCode == 0) { diff --git a/common/content/liberator.xul b/common/content/liberator.xul index b8003cfd..3f6ae0ca 100644 --- a/common/content/liberator.xul +++ b/common/content/liberator.xul @@ -85,6 +85,7 @@ the terms of any one of the MPL, the GPL or the LGPL.