diff options
| author | Maxime Coste <mawww@kakoune.org> | 2020-07-21 20:27:42 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2020-07-21 20:27:42 +1000 |
| commit | c2516f02f6ec036647f65b10e80f556ab9a71aab (patch) | |
| tree | 49fb049a51cbd583951c24ae3e6e9dee802d13bd /src/utils.hh | |
| parent | 2df6a572012ba99de730816c698a4a3f67f17eac (diff) | |
Do not trigger RegisterModified hooks on register about to be restored
This greatly reduces the amount of hooks triggered.
Diffstat (limited to 'src/utils.hh')
| -rw-r--r-- | src/utils.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils.hh b/src/utils.hh index 0979aebe..087c4ba8 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -107,6 +107,12 @@ struct ScopedSetBool m_nested_bool.set(); } + ScopedSetBool(ScopedSetBool&& other) + : m_nested_bool(other.m_nested_bool), m_condition(other.m_condition) + { + other.m_condition = false; + } + ~ScopedSetBool() { if (m_condition) |
