Add operator mode per Vim. Wrap most editor commands in transactions. And stuff. Closes issue #439.

This commit is contained in:
Kris Maglione committed 2011-08-05 16:50:00 -04:00
1 parent 55f5f9292b
commit f502617a84
7 files changed
+201 -193

No files matched your search

+8 -1
View File
@@ -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); }