Change env vars that are lists to use the general list syntax

This commit is contained in:
Maxime Coste 2018-06-01 08:19:23 +10:00
parent a6ba65c121
commit 76093f252c

View File

@ -94,7 +94,7 @@ static const EnvVarDesc builtin_env_vars[] = { {
"buflist", false, "buflist", false,
[](StringView name, const Context& context) [](StringView name, const Context& context)
{ return join(BufferManager::instance() | { return join(BufferManager::instance() |
transform(&Buffer::display_name), ':'); } transform(&Buffer::display_name) | transform(quote), ' ', false); }
}, { }, {
"buf_line_count", false, "buf_line_count", false,
[](StringView name, const Context& context) -> String [](StringView name, const Context& context) -> String
@ -115,7 +115,7 @@ static const EnvVarDesc builtin_env_vars[] = { {
}, { }, {
"selections", false, "selections", false,
[](StringView name, const Context& context) [](StringView name, const Context& context)
{ return join(context.selections_content(), ':'); } { return join(context.selections_content() | transform(quote), ' ', false); }
}, { }, {
"runtime", false, "runtime", false,
[](StringView name, const Context& context) [](StringView name, const Context& context)
@ -157,7 +157,7 @@ static const EnvVarDesc builtin_env_vars[] = { {
[](StringView name, const Context& context) -> String [](StringView name, const Context& context) -> String
{ return join(ClientManager::instance() | { return join(ClientManager::instance() |
transform([](const std::unique_ptr<Client>& c) -> const String& transform([](const std::unique_ptr<Client>& c) -> const String&
{ return c->context().name(); }), ':'); } { return c->context().name(); }), ' ', false); }
}, { }, {
"modified", false, "modified", false,
[](StringView name, const Context& context) -> String [](StringView name, const Context& context) -> String
@ -205,7 +205,7 @@ static const EnvVarDesc builtin_env_vars[] = { {
}, { }, {
"user_modes", false, "user_modes", false,
[](StringView name, const Context& context) -> String [](StringView name, const Context& context) -> String
{ return join(context.keymaps().user_modes(), ':'); } { return join(context.keymaps().user_modes(), ' ', false); }
} }
}; };