From d248f925003198807b99ba24573e6b4a89c5b9bd Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 20 May 2009 22:05:35 +1000 Subject: [PATCH] Improve :mkvimperatorrc error messages. --- common/content/io.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/content/io.js b/common/content/io.js index f4157c92..31700ae8 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -279,7 +279,12 @@ function IO() //{{{ "Write current key mappings and changed options to the config file", function (args) { - // TODO: "E172: Only one file name allowed" + if (args.length > 1) + { + liberator.echoerr("E172: Only one file name allowed"); + return; + } + let filename = args[0] || io.getRCFile(null, true).path; let file = io.getFile(filename); @@ -317,7 +322,7 @@ function IO() //{{{ } }, { - argCount: "?", + argCount: "*", // FIXME: should be "?" but kludged for proper error message bang: true, completer: function (context) completion.file(context, true) });