diff --git a/src/register_manager.cc b/src/register_manager.cc index 7bd1d7f9..6dc92006 100644 --- a/src/register_manager.cc +++ b/src/register_manager.cc @@ -34,7 +34,11 @@ void HistoryRegister::set(Context& context, ConstArrayView values, bool constexpr size_t size_limit = 100; if (restoring) - return StaticRegister::set(context, values, true); + { + StaticRegister::set(context, values, true); + m_content.erase(remove_if(m_content, [](auto&& s) { return s.empty(); }), m_content.end()); + return; + } for (auto& entry : values) {