1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-28 13:54:04 +02:00

Use builtin String.startsWith, String.endsWith, and String.contains methods where appropriate.

This commit is contained in:
Kris Maglione
2014-02-22 15:17:08 -08:00
parent 6790c62c41
commit 51eb03c376
19 changed files with 40 additions and 39 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2008-2013 Kris Maglione <maglione.k@gmail.com>
// Copyright (c) 2008-2014 Kris Maglione <maglione.k@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
@@ -626,7 +626,7 @@ var RangeFind = Class("RangeFind", {
if (!this.matchCase)
pattern = pattern.toLowerCase();
if (!again && (pattern === "" || pattern.indexOf(this.lastString) !== 0 || this.backward)) {
if (!again && (pattern === "" || !pattern.startsWith(this.lastString) || this.backward)) {
if (!private_)
this.range.deselect();
if (pattern === "")