summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-09-26 23:43:05 +0100
committerMaxime Coste <frrrwww@gmail.com>2016-09-26 23:43:05 +0100
commite3c4bddd3b4641942043af8408dc5ba55444a9e3 (patch)
treeae6661b4d2261dd2e5e722dc5629f4cc7ca6ac44 /src/input_handler.cc
parent696db111e2a23549924b12f62970e51c363226f6 (diff)
Make hook disabling work for all hooks, not only user hooks
Fixes #823
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index a8970164..c7675a1a 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -177,7 +177,7 @@ public:
auto restore_hooks = on_scope_end([&, this]{
if (m_hooks_disabled and do_restore_hooks)
{
- context().user_hooks_disabled().unset();
+ context().hooks_disabled().unset();
m_hooks_disabled = false;
}
});
@@ -201,7 +201,7 @@ public:
if (not m_hooks_disabled)
{
m_hooks_disabled = true;
- context().user_hooks_disabled().set();
+ context().hooks_disabled().set();
}
}
else if (key == '"')
@@ -939,11 +939,11 @@ public:
m_completer.update();
context().hooks().run_hook("InsertIdle", "", context());
}},
- m_disable_hooks{context().user_hooks_disabled()}
+ m_disable_hooks{context().hooks_disabled()}
{
// Prolongate hook disabling for the whole insert session
if (m_disable_hooks)
- context().user_hooks_disabled().set();
+ context().hooks_disabled().set();
last_insert().mode = mode;
last_insert().keys.clear();
@@ -963,7 +963,7 @@ public:
selections.avoid_eol();
if (m_disable_hooks)
- context().user_hooks_disabled().unset();
+ context().hooks_disabled().unset();
}
void on_enabled() override
@@ -1292,7 +1292,7 @@ void InputHandler::repeat_last_insert()
Vector<Key> keys;
swap(keys, m_last_insert.keys);
- ScopedSetBool disable_hooks(context().user_hooks_disabled(),
+ ScopedSetBool disable_hooks(context().hooks_disabled(),
m_last_insert.disable_hooks);
// context.last_insert will be refilled by the new Insert
// this is very inefficient.