mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 05:57:58 +01:00
don't filter out "" elements from stringlist options as they can be significant
E.g. 'cdpath'
This commit is contained in:
@@ -124,17 +124,14 @@ function IO() //{{{
|
|||||||
////////////////////// OPTIONS ////////////////////////////////////////////////
|
////////////////////// OPTIONS ////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
// FIXME: path options need to be of type string now, not stringlist, since
|
|
||||||
// the original arg is, for some reason, no longer preserved for stringlist
|
|
||||||
// E.g. :set cdpath=,, This comes at the expense of += etc
|
|
||||||
options.add(["cdpath", "cd"],
|
options.add(["cdpath", "cd"],
|
||||||
"List of directories searched when executing :cd",
|
"List of directories searched when executing :cd",
|
||||||
"string", cdpath,
|
"stringlist", cdpath,
|
||||||
{ setter: function (value) expandPathList(value) });
|
{ setter: function (value) expandPathList(value) });
|
||||||
|
|
||||||
options.add(["runtimepath", "rtp"],
|
options.add(["runtimepath", "rtp"],
|
||||||
"List of directories searched for runtime files",
|
"List of directories searched for runtime files",
|
||||||
"string", runtimepath,
|
"stringlist", runtimepath,
|
||||||
{ setter: function (value) expandPathList(value) });
|
{ setter: function (value) expandPathList(value) });
|
||||||
|
|
||||||
options.add(["shell", "sh"],
|
options.add(["shell", "sh"],
|
||||||
|
|||||||
@@ -643,7 +643,12 @@ function Options() //{{{
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
newValue = newValue.filter(function (x) x != "").join(option.type == "charlist" ? "" : ",");
|
|
||||||
|
// NOTE: empty elements are significant in stringlist options like 'cdpath'
|
||||||
|
if (option.type == "stringlist")
|
||||||
|
newValue = newValue.join(",");
|
||||||
|
else
|
||||||
|
newValue = newValue.filter(function (x) x != "").join("");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user