1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 20:44:11 +01:00

More comprehensive :jumps.

This commit is contained in:
Kris Maglione
2011-10-20 06:04:10 -04:00
parent 419d9b61f8
commit 933f490817
5 changed files with 42 additions and 8 deletions

View File

@@ -293,6 +293,33 @@ var History = Module("history", {
],
privateData: true
});
commands.add(["ju[mps]"],
"Show jumplist",
function () {
let sh = history.session;
let index = sh.index;
let jumps = marks.jumps;
if (jumps.index < 0)
jumps = [sh[sh.index]];
else {
index += jumps.index;
jumps = jumps.locations.map(function (l) ({
__proto__: l,
title: buffer.title,
get URI() util.newURI(this.location)
}));
}
let list = sh.slice(0, sh.index)
.concat(jumps)
.concat(sh.slice(sh.index + 1));
commandline.commandOutput(template.jumps(index, list));
},
{ argCount: "0" });
},
completion: function () {
completion.domain = function (context) {