1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-24 15:35:47 +01:00

Fix completion.buffer

This commit is contained in:
Kris Maglione
2008-12-07 08:38:14 -05:00
parent 459e6ff217
commit 31880b5312

View File

@@ -1177,26 +1177,26 @@ function Completion() //{{{
buffer: function buffer(context) buffer: function buffer(context)
{ {
filter = context.filter.toLowerCase(); filter = context.filter.toLowerCase();
context.anchored = false;
context.title = ["Buffer", "URL"]; context.title = ["Buffer", "URL"];
context.keys = { text: "text", description: "url", icon: "icon" }; context.keys = { text: "text", description: "url", icon: "icon" };
let process = context.process[0]; let process = context.process[0];
context.process = [function (item) context.process = [function (item, text)
<> <>
<span highlight="Indicator" style="display: inline-block; width: 1.5em; text-align: center">{item.item.indicator}</span> <span highlight="Indicator" style="display: inline-block; width: 1.5em; text-align: center">{item.item.indicator}</span>
{ process.call(this, item) } { process.call(this, item, text) }
</>]; </>];
context.completions = util.map(tabs.browsers, function ([i, browser]) { context.completions = util.map(tabs.browsers, function ([i, browser]) {
let indicator = " ";
if (i == tabs.index()) if (i == tabs.index())
indicator = "%" indicator = "%"
else if (i == tabs.index(tabs.alternate)) else if (i == tabs.index(tabs.alternate))
indicator = "#"; indicator = "#";
else
indicator = " ";
let tab = tabs.getTab(i); let tab = tabs.getTab(i);
i = i + 1;
let url = browser.contentDocument.location.href; let url = browser.contentDocument.location.href;
i = i + 1;
return { return {
text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url], text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url],