diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-02-13 23:31:16 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-02-13 23:31:16 +0000 |
| commit | e3a04dfa651ea4b32af64f207291ca8818adbf32 (patch) | |
| tree | 929827a963dfe9d5d7152b5be6586b08f415ab5d /src | |
| parent | 55bd3b7949f4a2227313133f7104f8d9ffde0d6c (diff) | |
Fix RegisterRestorer not handling potential throws on register assign
This should fix part of #1214
Diffstat (limited to 'src')
| -rw-r--r-- | src/commands.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc index 46f1e14b..65a0b752 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -1510,8 +1510,15 @@ public: ~RegisterRestorer() { - if (m_name != 0) + if (m_name != 0) try + { RegisterManager::instance()[m_name] = m_save; + } + catch (runtime_error& e) + { + write_to_debug_buffer(format("Could not restore register '{}': {}", + m_name, e.what())); + } } private: |
