From a3d463d8bbc1e7ae0c8bfd608715aff390651b4e Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 25 Jun 2007 12:06:51 +0000 Subject: [PATCH] make error messages generated by :set more Vim-like --- chrome/content/vimperator/commands.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index fc4eeca8..1c12a949 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -1616,7 +1616,7 @@ function set(args, special) { var num = parseInt(val, 10); if (isNaN(num)) - vimperator.echoerr("Invalid argument type to option " + option.name + ": Expects number"); + vimperator.echoerr("E521: Number required after =: " + option.name + "=" + val); else { var cur_val = option.value; @@ -1624,7 +1624,7 @@ function set(args, special) if (oper == '-') num = cur_val - num; // FIXME if (option.validator != null && option.validator.call(this, num) == false) - vimperator.echoerr("Invalid argument to option " + option.name + ": Check help for more details"); + vimperator.echoerr("E521: Number required after =: " + option.name + "=" + val); else // all checks passed, execute option handler option.value = num; } @@ -1650,12 +1650,12 @@ function set(args, special) } // FIXME if (option.validator != null && option.validator.call(this, val) == false) - vimperator.echoerr("Invalid argument to option " + option.name + ": Check help for more details"); + vimperator.echoerr("E474: Invalid argument: " + option.name + "=" + val); else // all checks passed, execute option handler option.value = val; } else - vimperator.echoerr("Internal error, option format `" + type + "' not supported"); + vimperator.echoerr("E685: Internal error: option format `" + type + "' not supported"); } } }