mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 12:27:58 +01:00
Add arg validation to :pageinfo.
This commit is contained in:
@@ -1423,7 +1423,13 @@ var Buffer = Module("buffer", {
|
|||||||
|
|
||||||
commands.add(["pa[geinfo]"],
|
commands.add(["pa[geinfo]"],
|
||||||
"Show various page information",
|
"Show various page information",
|
||||||
function (args) { buffer.showPageInfo(true, args[0]); },
|
function (args) {
|
||||||
|
let arg = args[0];
|
||||||
|
let opt = options.get("pageinfo");
|
||||||
|
|
||||||
|
dactyl.assert(opt.validator(opt.parse(arg)), "E475: Invalid argument: " + arg);
|
||||||
|
buffer.showPageInfo(true, arg);
|
||||||
|
},
|
||||||
{
|
{
|
||||||
argCount: "?",
|
argCount: "?",
|
||||||
completer: function (context) {
|
completer: function (context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user