mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 09:27:58 +01:00
Fix error message for :source with too many args.
This commit is contained in:
@@ -335,7 +335,7 @@ function IO() //{{{
|
|||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
let list = template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"],
|
let list = template.tabular(["<SNR>", "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);
|
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||||
},
|
},
|
||||||
@@ -345,11 +345,13 @@ function IO() //{{{
|
|||||||
"Read Ex commands from a file",
|
"Read Ex commands from a file",
|
||||||
function (args)
|
function (args)
|
||||||
{
|
{
|
||||||
// FIXME: "E172: Only one file name allowed"
|
if (args.length > 1)
|
||||||
io.source(args[0], args.bang);
|
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,
|
bang: true,
|
||||||
completer: function (context) completion.file(context, true)
|
completer: function (context) completion.file(context, true)
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user