From cd52ef6ad3c394e3a701ed614d080913045b706b Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 4 Sep 2009 02:25:06 +1000 Subject: [PATCH] Fix parsing of Ex commands run with leading whitespace. --- common/content/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/commands.js b/common/content/commands.js index 9b99e07c..1ad66660 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -921,7 +921,7 @@ function Commands() //{{{ str.replace(/\s*".*$/, ""); // 0 - count, 1 - cmd, 2 - special, 3 - args - let matches = str.match(/^:*(\d+|%)?([a-zA-Z]+|!)(!)?(?:\s*(.*?))?$/); + let matches = str.match(/^[:\s]*(\d+|%)?([a-zA-Z]+|!)(!)?(?:\s*(.*?))?$/); //var matches = str.match(/^:*(\d+|%)?([a-zA-Z]+|!)(!)?(?:\s*(.*?)\s*)?$/); if (!matches) return [null, null, null, null];