summaryrefslogtreecommitdiff
path: root/src/hook_manager.cc
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2022-07-31 20:48:38 +0200
committerJohannes Altmanninger <aclopte@gmail.com>2023-06-17 11:21:16 +0200
commit00490cd08427250aaabc4fca791d8c0381b95fde (patch)
tree35d7ca14ab3e30c5e46ad4cc2efbac6018bfbb6b /src/hook_manager.cc
parent7027cccf822148463eed4de1ad9240fd3526ae8b (diff)
Rename "disable_history" stack state to "noninteractive"
The commit after next will fix a bug where we wrongly disable prompt history in some scenarios. The root cause is that life span of "disable_history" does not model when we actually want to disable history. Let's rename the state variable to "noninteractive". It's set whenever we are executing a hook, mapping or command. Note that it's also active inside ":prompt"'s callback, which doesn't play well with the new name :(
Diffstat (limited to 'src/hook_manager.cc')
-rw-r--r--src/hook_manager.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hook_manager.cc b/src/hook_manager.cc
index 406b803f..afab5461 100644
--- a/src/hook_manager.cc
+++ b/src/hook_manager.cc
@@ -37,7 +37,7 @@ struct HookManager::HookData
enum_desc(Meta::Type<Hook>{})[to_underlying(hook)].name,
param, group));
- ScopedSetBool disable_history{context.history_disabled()};
+ ScopedSetBool noninteractive{context.noninteractive()};
EnvVarMap env_vars{ {"hook_param", param.str()} };
for (size_t i = 0; i < captures.size(); ++i)