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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user