diff --git a/content/io.js b/content/io.js index 28261479..3083e064 100644 --- a/content/io.js +++ b/content/io.js @@ -124,17 +124,14 @@ function IO() //{{{ ////////////////////// 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"], "List of directories searched when executing :cd", - "string", cdpath, + "stringlist", cdpath, { setter: function (value) expandPathList(value) }); options.add(["runtimepath", "rtp"], "List of directories searched for runtime files", - "string", runtimepath, + "stringlist", runtimepath, { setter: function (value) expandPathList(value) }); options.add(["shell", "sh"], diff --git a/content/options.js b/content/options.js index 3ffe7abf..865d74d7 100644 --- a/content/options.js +++ b/content/options.js @@ -643,7 +643,12 @@ function Options() //{{{ } 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;