summaryrefslogtreecommitdiff
path: root/src/context.hh
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/context.hh
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/context.hh')
-rw-r--r--src/context.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/context.hh b/src/context.hh
index 34bb9e12..69377148 100644
--- a/src/context.hh
+++ b/src/context.hh
@@ -126,8 +126,8 @@ public:
NestedBool& keymaps_disabled() { return m_keymaps_disabled; }
const NestedBool& keymaps_disabled() const { return m_keymaps_disabled; }
- NestedBool& history_disabled() { return m_history_disabled; }
- const NestedBool& history_disabled() const { return m_history_disabled; }
+ NestedBool& noninteractive() { return m_noninteractive; }
+ const NestedBool& noninteractive() const { return m_noninteractive; }
Flags flags() const { return m_flags; }
@@ -207,7 +207,7 @@ private:
NestedBool m_hooks_disabled;
NestedBool m_keymaps_disabled;
- NestedBool m_history_disabled;
+ NestedBool m_noninteractive;
};
struct ScopedEdition