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

use RegExp#test in preference to String#match

This commit is contained in:
Doug Kearns
2007-11-22 11:46:49 +00:00
parent d5c5869d56
commit 708fafe4a6
7 changed files with 39 additions and 41 deletions

View File

@@ -495,7 +495,7 @@ vimperator.CommandLine = function () //{{{
[completionStartIndex, completions] = res;
// sort the completion list
if (vimperator.options["wildoptions"].search(/\bsort\b/) > -1)
if (/\bsort\b/.test(vimperator.options["wildoptions"]))
{
completions.sort(function (a, b) {
if (a[0] < b[0])