1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 03:22:26 +01:00

Fix broken JS completion.

--HG--
branch : testing
This commit is contained in:
Kris Maglione
2010-06-03 20:24:16 -04:00
parent b6267c4f19
commit a6f90714e4
11 changed files with 51 additions and 53 deletions

View File

@@ -361,7 +361,7 @@ const RangeFind = Class("RangeFind", {
// This doesn't work yet.
resetCaret: function () {
let equal = RangeFind.equal;
letselection = this.win.getSelection();
let selection = this.win.getSelection();
if (selection.rangeCount == 0)
selection.addRange(this.pageStart);
function getLines() {
@@ -627,7 +627,13 @@ const RangeFind = Class("RangeFind", {
range.collapse(before);
return range;
},
equal: function (r1, r2) !r1.compareBoundaryPoints(Range.START_TO_START, r2) && !r1.compareBoundaryPoints(Range.END_TO_END, r2)
equal: function (r1, r2) {
try {
return !r1.compareBoundaryPoints(Range.START_TO_START, r2) && !r1.compareBoundaryPoints(Range.END_TO_END, r2)
}
catch (e) {}
return false;
}
});
// vim: set fdm=marker sw=4 ts=4 et: