diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2023-05-14 12:59:18 +0200 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2023-05-25 00:04:23 +0200 |
| commit | e49c0fb04095a2a1c546fd033ce2a1a6df3eb8d0 (patch) | |
| tree | 2c3a229a467aaf9b8d4f864186938c85cd3d0914 /src/normal.cc | |
| parent | cfa658b899b44a8a0f4c7f3dd9811ae0d44ddd3a (diff) | |
unmap: fail if the mapping is currently executing
When unmapping a key sequence that is currently executing, we continue
executing freed memory which can have weird effects. Let's instead
throw an error if that happens. In future we can support unmap in
this scenario.
Closes #4896
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/normal.cc b/src/normal.cc index f1123ca7..87bf272a 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -2033,6 +2033,7 @@ void exec_user_mappings(Context& context, NormalParams params) ScopedEdition edition(context); ScopedSelectionEdition selection_edition{context}; + ScopedSetBool executing_mapping{mapping.is_executing}; for (auto& key : mapping.keys) context.input_handler().handle_key(key); }, "user mapping", |
