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

Push location stack on //?/n/N/[/].

This commit is contained in:
Kris Maglione
2011-08-11 03:44:22 -04:00
parent a5c442150b
commit d877fa5fea
4 changed files with 27 additions and 14 deletions

View File

@@ -44,6 +44,10 @@ var Marks = Module("marks", {
params.offset = buffer.scrollPosition;
params.path = util.generateXPath(buffer.findScrollable(0, params.offset.x));
params.timestamp = Date.now() * 1000;
params.equals = function (m) this.location == m.location
&& this.offset.x == m.offset.x
&& this.offset.y == m.offset.y
&& this.path == m.path;
return params;
},
@@ -90,6 +94,8 @@ var Marks = Module("marks", {
return;
let mark = this.add("'");
if (jump && mark.equals(jump.mark))
return;
if (!this.jumping) {
store.jumps[++store.jumpsIndex] = { mark: mark, reason: reason };