1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 21:07:59 +01:00

fix :back/:forward completers

This commit is contained in:
Doug Kearns
2008-12-17 21:25:07 +11:00
parent e7635cc329
commit 3adc77eca1

View File

@@ -697,18 +697,10 @@ function History() //{{{
bang: true, bang: true,
completer: function completer(context) completer: function completer(context)
{ {
let filter = context.filter; let sh = window.getWebNavigation().sessionHistory;
var sh = window.getWebNavigation().sessionHistory;
var completions = []; context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index, 0, true))];
for (let i in util.range(sh.index, 0, true)) context.keys = { text: function (item) item.URI.spec, description: "title" };
{
var entry = sh.getEntryAtIndex(i, false);
var url = entry.URI.spec;
var title = entry.title;
if (completion.match([url, title], filter, false))
completions.push([url, title]);
}
return [0, completions];
}, },
count: true, count: true,
literal: 0 literal: 0
@@ -750,18 +742,10 @@ function History() //{{{
bang: true, bang: true,
completer: function completer(context) completer: function completer(context)
{ {
let filter = context.filter; let sh = window.getWebNavigation().sessionHistory;
var sh = window.getWebNavigation().sessionHistory;
var completions = []; context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index + 1, sh.count))];
for (let i in util.range(sh.index + 1, sh.count)) context.keys = { text: function (item) item.URI.spec, description: "title" };
{
var entry = sh.getEntryAtIndex(i, false);
var url = entry.URI.spec;
var title = entry.title;
if (completion.match([url, title], filter, false))
completions.push([url, title]);
}
return [0, completions];
}, },
count: true, count: true,
literal: 0 literal: 0