1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-28 12:52:27 +01:00

Add forgotten changes.

This commit is contained in:
Kris Maglione
2011-09-26 17:05:55 -04:00
parent b2628cd65e
commit 8900946cf2
4 changed files with 25 additions and 18 deletions

View File

@@ -331,7 +331,6 @@ var RangeFinder = Module("rangefinder", {
*/
var RangeFind = Class("RangeFind", {
init: function init(window, matchCase, backward, elementPath, regexp) {
util.dumpStack("init " + backward);
this.window = Cu.getWeakReference(window);
this.content = window.content;
@@ -628,6 +627,7 @@ var RangeFind = Class("RangeFind", {
if (this.regexp)
try {
var flags = this.matchCase ? "" : "i";
RegExp(pattern);
}
catch (e) {
@@ -658,11 +658,11 @@ var RangeFind = Class("RangeFind", {
range = DOM.stringify(range);
if (!this.backward)
var match = RegExp(pattern, "m").exec(range);
var match = RegExp(pattern, "m" + flags).exec(range);
else {
match = RegExp("[^]*(?:" + pattern + ")", "m").exec(range);
match = RegExp("[^]*(?:" + pattern + ")", "m" + flags).exec(range);
if (match)
match = RegExp(pattern + "$").exec(match[0]);
match = RegExp(pattern + "$", flags).exec(match[0]);
}
if (!(match && match[0]))
continue;