diff --git a/chrome/content/vimperator/help.js b/chrome/content/vimperator/help.js index 201e24e5..044004ea 100644 --- a/chrome/content/vimperator/help.js +++ b/chrome/content/vimperator/help.js @@ -33,6 +33,7 @@ Vimperator.prototype.help = function(section, easter) //{{{ vimperator.echoerr("E478: Don't panic!"); return; } + if ((arguments[3] && arguments[3].inTab))// || !window.content.document.open) openURLsInNewTab("", true); else @@ -46,6 +47,7 @@ Vimperator.prototype.help = function(section, easter) //{{{ function makeHelpString(commands, beg, end, func) { var ret = ""; + var separator = '
\n'; for (var command in commands) { // the usage information for the command @@ -74,7 +76,7 @@ Vimperator.prototype.help = function(section, easter) //{{{ ret += ''; ret += command.short_help; // the help description ret += "
"; - if(func) // for options we print default values here, e.g. + if (func) // for options we print default values here, e.g. { ret += func.call(this, command); ret += "
"; @@ -103,18 +105,19 @@ Vimperator.prototype.help = function(section, easter) //{{{ ret += ''; // add more space between entries - // FIXME: if (i < commands.length-1) - ret += '
\n'; + ret += separator; } + ret = ret.replace(new RegExp(separator + '$'), ''); // FIXME: far too tasty! return ret; } + function makeOptionsHelpString(command) { var ret = ""; ret = command.type + ' (default: '; if (command.type == "boolean") { - if(command.default_value == true) + if (command.default_value == true) ret += "on"; else ret += "off";