1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:48:02 +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

@@ -615,7 +615,7 @@ vimperator.Events = function () //{{{
map = vimperator.mappings.get(vimperator.modes.NORMAL, candidateCommand);
// counts must be at the start of a complete mapping (10j -> go 10 lines down)
if ((vimperator.input.buffer + key).match(/^[1-9][0-9]*$/))
if (/^[1-9][0-9]*$/.test(vimperator.input.buffer + key))
{
// no count for insert mode mappings
if (vimperator.hasMode(vimperator.modes.COMMAND_LINE))