diff --git a/src/commands.cc b/src/commands.cc index a158b2c5..6907344b 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -1566,8 +1566,9 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func) RegisterManager::instance()[c].set(context, save); }); }; - auto saved_registers = parser.get_switch("save-regs").value_or("/\"|^@") | - transform(make_register_restorer) | gather>(); + Vector saved_registers; + for (auto c : parser.get_switch("save-regs").value_or("/\"|^@")) + saved_registers.push_back(make_register_restorer(c)); if (auto bufnames = parser.get_switch("buffer")) {