From 77beb82f45da54d3603b14e12e8649e9ab493ab5 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 26 Oct 2009 17:19:08 -0400 Subject: [PATCH] Filter :u completions based on text and description. --HG-- branch : xslt --- common/content/bookmarks.js | 8 ++++---- common/content/tabs.js | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index 246805d3..8b5f7574 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -880,10 +880,10 @@ function History() //{{{ let sh = history.session; context.anchored = false; - context.completions = sh.slice(0, sh.index).reverse(); - context.keys = { text: function (item) (sh.index - item.index) + ": " + item.URI.spec, description: "title", icon: "icon" }; context.compare = CompletionContext.Sort.unsorted; context.filters = [CompletionContext.Filter.textDescription]; + context.completions = sh.slice(0, sh.index).reverse(); + context.keys = { text: function (item) (sh.index - item.index) + ": " + item.URI.spec, description: "title", icon: "icon" }; }, count: true, literal: 0 @@ -922,10 +922,10 @@ function History() //{{{ let sh = history.session; context.anchored = false; - context.completions = sh.slice(sh.index + 1); - context.keys = { text: function (item) (item.index - sh.index) + ": " + item.URI.spec, description: "title", icon: "icon" }; context.compare = CompletionContext.Sort.unsorted; context.filters = [CompletionContext.Filter.textDescription]; + context.completions = sh.slice(sh.index + 1); + context.keys = { text: function (item) (item.index - sh.index) + ": " + item.URI.spec, description: "title", icon: "icon" }; }, count: true, literal: 0 diff --git a/common/content/tabs.js b/common/content/tabs.js index 78c1c7a0..13ca9add 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -670,7 +670,8 @@ function Tabs() //{{{ { context.anchored = false; context.compare = CompletionContext.Sort.unsorted; - context.keys = { text: function ([i, item]) (i + 1) + ": " + item.state.entries[item.state.index - 1].url, description: "[1].title", icon: "[1].image" }; + context.filters = [CompletionContext.Filter.textDescription]; + conext.keys = { text: function ([i, isem]) (i + 1) + ": " + item.state.entries[item.state.index - 1].url, description: "[1].title", icon: "[1].image" }; context.completions = Iterator(tabs.closedTabs); }, count: true,