From 92b0ffa75c8681eb2ba7a289264d30b7c41fb981 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 28 Nov 2008 09:17:00 +0000 Subject: [PATCH] Unbreak wrapping completion list in reverse. --- content/completion.js | 3 ++- content/ui.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/content/completion.js b/content/completion.js index 291a0ed9..9de539a4 100644 --- a/content/completion.js +++ b/content/completion.js @@ -124,8 +124,9 @@ CompletionContext.prototype = { // Temporary get allSubstrings() { + let lists = [c.substrings for ([i, c] in Iterator(this.contextList)) if (c.hasItems && c.items.length)]; + let minStart = Math.min.apply(Math, [c.offset for ([k, c] in Iterator(this.contextList)) if (c.hasItems && c.items.length)]); let self = this; - let minStart = Math.min.apply(Math, [context.offset for ([k, context] in Iterator(this.contexts)) if (context.items.length && context.hasItems)]); let items = this.contextList.map(function (context) { if (!context.hasItems) return []; diff --git a/content/ui.js b/content/ui.js index 24e38077..6adf75a1 100644 --- a/content/ui.js +++ b/content/ui.js @@ -1417,6 +1417,8 @@ function ItemList(id) //{{{ nodes[i] = row; for (let [i, row] in util.Array.iterator2(nodes)) { + if (!row) + continue; let display = (i >= start && i < end); if (display && row.parentNode != items) {