From 1e6ff58d4c606486252413414e0bf9a3ac04e7b6 Mon Sep 17 00:00:00 2001 From: Marco Candrian Date: Fri, 7 Dec 2007 13:37:37 +0000 Subject: [PATCH] using split instead of a regex to get lhs, rhs --- content/commands.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/commands.js b/content/commands.js index 96e9a7b8..d0e80e87 100644 --- a/content/commands.js +++ b/content/commands.js @@ -1307,8 +1307,7 @@ vimperator.Commands = function () //{{{ return; } - var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/); - var [lhs, rhs] = [matches[1], matches[2]]; + var [lhs, rhs] = args.split(/\s+/, 2); var leaderRegexp = //i; if (leaderRegexp.test(lhs))