diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index af7ef615..a07c30e6 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -122,21 +122,9 @@ function Command(specs, action, extra_info)//{{{ this.usage = this.name; } - // TODO: ternary operator? - if (extra_info.help) - this.help = extra_info.help; - else - this.help = null; - - if (extra_info.short_help) - this.short_help = extra_info.short_help; - else - this.short_help = null; - - if (extra_info.completer) - this.completer = extra_info.completer; - else - this.completer = null; + this.help = extra_info.help || null; + this.short_help = extra_info.short_help || null; + this.completer = extra_info.completer || null; } }//}}} diff --git a/chrome/content/vimperator/mappings.js b/chrome/content/vimperator/mappings.js index a11845a5..baeceeca 100644 --- a/chrome/content/vimperator/mappings.js +++ b/chrome/content/vimperator/mappings.js @@ -24,15 +24,8 @@ function Map(mode, cmds, act, extra_info) //{{{ this.usage += " {arg}"; } - if (extra_info.help) - this.help = extra_info.help; - else - this.help = null; - - if (extra_info.short_help) - this.short_help = extra_info.short_help; - else - this.short_help = null; + this.help = extra_info.help || null; + this.short_help = extra_info.short_help || null; } }