Expand %reg{} inside double quotes only to the main selection value

This commit is contained in:
Maxime Coste 2018-06-03 21:18:55 +10:00
parent 124a5d4905
commit 74e4925de0

View File

@ -265,7 +265,7 @@ auto expand_option(Option& opt, std::false_type)
auto expand_register(StringView reg, const Context& context, std::true_type)
{
return join(RegisterManager::instance()[reg].get(context) | transform(quote), ' ', false);
return context.main_sel_register_value(reg).str();
}
auto expand_register(StringView reg, const Context& context, std::false_type)