mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-24 20:55:44 +01:00
Add operator mode per Vim. Wrap most editor commands in transactions. And stuff. Closes issue #439.
This commit is contained in:
@@ -774,7 +774,14 @@ var RangeFind = Class("RangeFind", {
|
||||
}
|
||||
return true;
|
||||
},
|
||||
selectNodePath: ["a", "xhtml:a", "*[@onclick]"].map(function (p) "ancestor-or-self::" + p).join(" | ")
|
||||
selectNodePath: ["a", "xhtml:a", "*[@onclick]"].map(function (p) "ancestor-or-self::" + p).join(" | "),
|
||||
union: function union(a, b) {
|
||||
let start = a.compareBoundaryPoints(a.START_TO_START, b) < 0 ? a : b;
|
||||
let end = a.compareBoundaryPoints(a.END_TO_END, b) > 0 ? a : b;
|
||||
let res = start.cloneRange();
|
||||
res.setEnd(end.startContainer, end.endOffset);
|
||||
return res;
|
||||
}
|
||||
});
|
||||
|
||||
} catch(e){ if (typeof e === "string") e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
|
||||
|
||||
Reference in New Issue
Block a user