mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-06 18:45:47 +01:00
RangeFind highlight cleanup stuff and stuff.
This commit is contained in:
@@ -48,6 +48,16 @@ var RangeFinder = Module("rangefinder", {
|
||||
prefs.safeSet("accessibility.typeaheadfind", false);
|
||||
},
|
||||
|
||||
cleanup: function cleanup() {
|
||||
for (let doc in util.iterDocuments()) {
|
||||
let find = overlay.getData(doc, "range-find", null);
|
||||
if (find)
|
||||
find.highlight(true);
|
||||
|
||||
overlay.setData(doc, "range-find", null);
|
||||
}
|
||||
},
|
||||
|
||||
get commandline() this.modules.commandline,
|
||||
get modes() this.modules.modes,
|
||||
get options() this.modules.options,
|
||||
@@ -719,7 +729,6 @@ var RangeFind = Class("RangeFind", {
|
||||
this.range = range;
|
||||
this.document = range.startContainer.ownerDocument;
|
||||
this.window = this.document.defaultView;
|
||||
this.docShell = util.docShell(this.window);
|
||||
|
||||
if (this.selection == null)
|
||||
return false;
|
||||
@@ -727,6 +736,8 @@ var RangeFind = Class("RangeFind", {
|
||||
this.save();
|
||||
},
|
||||
|
||||
docShell: Class.Memoize(function () util.docShell(this.window)),
|
||||
|
||||
intersects: function (range) RangeFind.intersects(this.range, range),
|
||||
|
||||
save: function save() {
|
||||
|
||||
@@ -972,7 +972,11 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
object = Iterator(object);
|
||||
hasValue = false;
|
||||
}
|
||||
for (let i in object) {
|
||||
let keyIter = object;
|
||||
if ("__iterator__" in object && !callable(object.__iterator__))
|
||||
keyIter = keys(object)
|
||||
|
||||
for (let i in keyIter) {
|
||||
let value = <![CDATA[<no value>]]>;
|
||||
try {
|
||||
value = object[i];
|
||||
|
||||
Reference in New Issue
Block a user