diff options
| author | Enrico Borba <enricozb@users.noreply.github.com> | 2024-12-23 09:23:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-23 09:23:58 +0100 |
| commit | 52125e6336d596aebdd4da91080b3178ddca7449 (patch) | |
| tree | 27d3e5c01660d567f22fee621c97753f294256b0 /src/register_manager.cc | |
| parent | 14cb35f62b36b2f1aa530adb5e31c05ff1347bfc (diff) | |
| parent | 9c458c50661446fc6e7295787b06422137af099d (diff) | |
Merge branch 'master' into enricozb/daemon-stdin
Diffstat (limited to 'src/register_manager.cc')
| -rw-r--r-- | src/register_manager.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/register_manager.cc b/src/register_manager.cc index a189c5b6..b9d09a52 100644 --- a/src/register_manager.cc +++ b/src/register_manager.cc @@ -3,11 +3,23 @@ #include "assert.hh" #include "context.hh" #include "hash_map.hh" -#include "string_utils.hh" +#include "format.hh" +#include "ranges.hh" +#include "hook_manager.hh" namespace Kakoune { +Register::RestoreInfo Register::save(const Context& context) +{ + return get(context) | gather<RestoreInfo>(); +} + +void Register::restore(Context& context, const RestoreInfo& info) +{ + set(context, info, true); +} + void StaticRegister::set(Context& context, ConstArrayView<String> values, bool) { m_content.assign(values.begin(), values.end()); |
