From aea3f5939236f83f4d8ffb68c809d57d43d9763f Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 11 Aug 2007 16:26:49 +0000 Subject: [PATCH] only allow :source to accept a single filename --- chrome/content/vimperator/commands.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index 0a20f4d1..e00fead3 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -1017,7 +1017,16 @@ function Commands() //{{{ } )); addDefaultCommand(new Command(["so[urce]"], - function(args) { vimperator.source(args); }, + function(args) + { + if (/[^\\]\s/.test(args)) + { + vimperator.echoerr("E172: Only one file name allowed"); + return; + } + + vimperator.source(args); + }, { usage: ["so[urce][!] {file}"], short_help: "Read Ex commands from {file}",