mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 04:07:58 +01:00
Allow setting empty value to some stringlist options
* eventignore
* activate
* newtab
* suggestengines
* wildoptions
Signed-off-by: Kris Maglione <maglione.k@gmail.com>
This commit is contained in:
@@ -1662,7 +1662,8 @@ function Completion() //{{{
|
|||||||
completer = function () [["true", ""], ["false", ""]];
|
completer = function () [["true", ""], ["false", ""]];
|
||||||
break;
|
break;
|
||||||
case "stringlist":
|
case "stringlist":
|
||||||
len = newValues.pop().length;
|
let target = newValues.pop();
|
||||||
|
len = target ? target.length : 0;
|
||||||
break;
|
break;
|
||||||
case "charlist":
|
case "charlist":
|
||||||
len = 0;
|
len = 0;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ Option.prototype = {
|
|||||||
parseValues: function (value)
|
parseValues: function (value)
|
||||||
{
|
{
|
||||||
if (this.type == "stringlist")
|
if (this.type == "stringlist")
|
||||||
return value.split(",");
|
return (value === "") ? [] : value.split(",");
|
||||||
if (this.type == "charlist")
|
if (this.type == "charlist")
|
||||||
return Array.slice(value);
|
return Array.slice(value);
|
||||||
return value;
|
return value;
|
||||||
|
|||||||
Reference in New Issue
Block a user