diff --git a/common/content/completion.js b/common/content/completion.js index 59e61fe9..4a4a19d9 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -1217,12 +1217,12 @@ function Completion() //{{{ colorScheme: function colorScheme(context) { - options.get("runtimepath").values.forEach(function (path) { - context.fork(path, 0, null, function (context) { - context.filter = path + "/colors/" + context.filter; + io.getRuntimeDirectories("colors").forEach(function (dir) { + context.fork(dir.path, 0, null, function (context) { + context.filter = dir.path + io.pathSeparator + context.filter; completion.file(context, true); - context.title = [path + "/colors/"]; - context.quote = function (text) text.replace(/\.vimp$/, ""); + context.title = [dir.path]; // TODO: why not "Colorscheme"? + context.quote = ["", function (text) text.replace(/\.vimp$/, ""), ""]; }); }); }, diff --git a/common/content/io.js b/common/content/io.js index 5078e898..fd9c3857 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -413,6 +413,8 @@ function IO() //{{{ sourcing: null, + pathSeparator: WINDOWS ? "\\" : "/", + expandPath: function (path) { // TODO: proper pathname separator translation like Vim - this should be done elsewhere