From 01c4f1b136d0fca64ccc96921026f312a34d1531 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 27 Oct 2009 15:59:56 -0400 Subject: [PATCH] Fix oddly broken completion results. --HG-- branch : xslt --- common/content/completion.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/content/completion.js b/common/content/completion.js index 376838a1..40f4d086 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -234,10 +234,10 @@ CompletionContext.prototype = { if (!context.hasItems) return []; let prefix = self.value.substring(minStart, context.offset); - return context.items.map(function (item) { - item.text = prefix + item.text; - return item; - }); + return context.items.map(function (item) ({ + text: prefix + item.text, + __proto__: item + })); }); return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring }; }