diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2025-03-23 16:16:25 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-03-24 08:28:55 +1100 |
| commit | b242a4e049cb94e304183472ab81b027d67c31d6 (patch) | |
| tree | 2fe1778f962473dace42d269d8d28cf982c23e03 /src/hook_manager.cc | |
| parent | 6fa99d403c0d5884610fd23e59a2fc10ed258a9a (diff) | |
Fix prompt history recording when using mapped keys
Commit e3122ab2c (Refactor prompt history handling, 2023-07-05) was a nice
simplification but it breaks a rare edge case. It suppresses history
recording if all keys the prompt receives were synthesized. That's not
quite the right criteria:
it means that if prompt is created, edited and and executed, all via mapped
keys, we fail to add to history.
The criteria should rather be something like "if all keys the prompt receives
came from synthesized events".
Make it so. This allows us to get rid of the "noninteractive" nested bool
that was only used for disabling history.
Diffstat (limited to 'src/hook_manager.cc')
| -rw-r--r-- | src/hook_manager.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/hook_manager.cc b/src/hook_manager.cc index ae3acf65..ee461a83 100644 --- a/src/hook_manager.cc +++ b/src/hook_manager.cc @@ -37,8 +37,6 @@ struct HookManager::HookData enum_desc(Meta::Type<Hook>{})[to_underlying(hook)].name, param, group)); - ScopedSetBool noninteractive{context.noninteractive()}; - EnvVarMap env_vars{ {"hook_param", param.str()} }; for (size_t i = 0; i < captures.size(); ++i) env_vars.insert({format("hook_param_capture_{}", i), |
