diff --git a/content/options.js b/content/options.js index cce3b61c..fbd5aee0 100644 --- a/content/options.js +++ b/content/options.js @@ -437,7 +437,10 @@ vimperator.Options = function() //{{{ "
P and gP mappings:set complete=bs would list bookmarks first, and then any available quick searches.'sort' to the 'wildoptions' option if you want all entries sorted.",
default_value: "sfbh",
- validator: function (value) { if (/[^sfbh]/.test(value)) return false; else return true; }
+ validator: function(value) { return !/[^sfbh]/.test(value); }
}
));
this.add(new vimperator.Option(["defsearch", "ds"], "string",
@@ -497,7 +500,7 @@ vimperator.Options = function() //{{{
"",
setter: function(value) { setGuiOptions(value); },
default_value: "",
- validator: function (value) { if (/[^mTb]/.test(value)) return false; else return true; }
+ validator: function(value) { return !/[^mTb]/.test(value); }
}
));
this.add(new vimperator.Option(["hintchars", "hc"], "charlist",
@@ -558,7 +561,7 @@ vimperator.Options = function() //{{{
"NOTE: laststatus=1 not implemented yet.",
default_value: 2,
setter: function(value) { setLastStatus(value); },
- validator: function (value) { if (value >= 0 && value <= 2) return true; else return false; }
+ validator: function(value) { return (value >= 0 && value <= 2); }
}
));
this.add(new vimperator.Option(["linksearch", "lks"], "boolean",
@@ -610,7 +613,7 @@ vimperator.Options = function() //{{{
"NOTE: This option does not change the popup blocker of Firefox in any way.",
default_value: 1,
setter: function(value) { setPopups(value); },
- validator: function (value) { if (value >= 0 && value <= 3) return true; else return false; }
+ validator: function(value) { return (value >= 0 && value <= 3); }
}
));
this.add(new vimperator.Option(["preload"], "boolean",
@@ -628,7 +631,7 @@ vimperator.Options = function() //{{{
"Close the preview window with :pclose.{count} is specified to the <C-u> or <C-d> commands this is used to set the value of 'scroll' and also used for the current command. " +
"The value can be reset to half the window height with :set scroll=0.",
default_value: 0,
- validator: function (value) { if (value >= 0) return true; else return false; }
+ validator: function(value) { return value >= 0; }
}
));
this.add(new vimperator.Option(["showmode", "smd"], "boolean",
@@ -658,7 +661,7 @@ vimperator.Options = function() //{{{
":javascript!.'complete' option.