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

use RegExp#test in preference to String#match

This commit is contained in:
Doug Kearns
2007-11-16 12:48:03 +00:00
parent fea5cceecc
commit f50bca0453
9 changed files with 44 additions and 45 deletions

View File

@@ -647,7 +647,7 @@ vimperator.Events = function () //{{{
map = vimperator.mappings.get(vimperator.mode, candidate_command);
// 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.mode == vimperator.modes.INSERT || vimperator.mode == vimperator.modes.COMMAND_LINE)