From 895e40a8032a017ae1a72daf7d68d45d63306d3e Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 13 May 2009 01:39:52 +1000 Subject: [PATCH] Fix error message for :source with too many args. --- common/content/io.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common/content/io.js b/common/content/io.js index 0b850bfe..cd05d0e9 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -335,7 +335,7 @@ function IO() //{{{ function () { let list = template.tabular(["", "Filename"], ["text-align: right; padding-right: 1em;"], - ([i + 1, file] for ([i, file] in Iterator(scriptNames)))); // TODO: add colon? + ([i + 1, file] for ([i, file] in Iterator(scriptNames)))); // TODO: add colon and remove column titles for pedantic Vim compatibility? commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); }, @@ -345,11 +345,13 @@ function IO() //{{{ "Read Ex commands from a file", function (args) { - // FIXME: "E172: Only one file name allowed" - io.source(args[0], args.bang); + if (args.length > 1) + liberator.echoerr("E172: Only one file name allowed"); + else + io.source(args[0], args.bang); }, { - argCount: "1", + argCount: "+", // FIXME: should be "1" but kludged for proper error message bang: true, completer: function (context) completion.file(context, true) });