diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-05-13 17:59:01 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-05-14 08:23:00 +1000 |
| commit | 75eb293f986f5674041159c714e1fffbe773b04b (patch) | |
| tree | 9ac91714c9832b8da3ba8d25f01a515af03ac3cd /src/input_handler.cc | |
| parent | b204e773d461233aa9b106d32d051333865b2d1b (diff) | |
Rename Context::Flags::Transient to Context::Flags::Draft
Draft is well establish and all draft context are transient.
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index ff6e126f..f9710609 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -163,12 +163,12 @@ public: Normal(InputHandler& input_handler, bool single_command = false) : InputMode(input_handler), m_idle_timer{TimePoint::max(), - context().flags() & Context::Flags::Transient ? + context().flags() & Context::Flags::Draft ? Timer::Callback{} : [this](Timer&) { context().hooks().run_hook("NormalIdle", "", context()); }}, m_fs_check_timer{TimePoint::max(), - context().flags() & Context::Flags::Transient ? + context().flags() & Context::Flags::Draft ? Timer::Callback{} : Timer::Callback{[this](Timer& timer) { if (context().has_client()) context().client().check_if_buffer_needs_reloading(); @@ -179,7 +179,7 @@ public: void on_enabled() override { - if (not (context().flags() & Context::Flags::Transient)) + if (not (context().flags() & Context::Flags::Draft)) { if (context().has_client()) context().client().check_if_buffer_needs_reloading(); @@ -234,7 +234,7 @@ public: } }); - const bool transient = context().flags() & Context::Flags::Transient; + const bool transient = context().flags() & Context::Flags::Draft; auto cp = key.codepoint(); @@ -709,7 +709,7 @@ public: m_empty_text{std::move(emptystr)}, m_flags(flags), m_completer(std::move(completer)), m_callback(std::move(callback)), m_autoshowcompl{context().options()["autoshowcompl"].get<bool>()}, - m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Transient ? + m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Draft ? Timer::Callback{} : [this](Timer&) { if (m_autoshowcompl and m_refresh_completion_pending) refresh_completions(CompletionFlags::Fast); @@ -905,7 +905,7 @@ public: display(); m_line_changed = true; - if (enabled() and not (context().flags() & Context::Flags::Transient)) // The callback might have disabled us + if (enabled() and not (context().flags() & Context::Flags::Draft)) // The callback might have disabled us m_idle_timer.set_next_date(Clock::now() + get_idle_timeout(context())); } @@ -991,7 +991,7 @@ private: display(); m_line_changed = true; - if (not (context().flags() & Context::Flags::Transient)) + if (not (context().flags() & Context::Flags::Draft)) m_idle_timer.set_next_date(Clock::now() + get_idle_timeout(context())); } @@ -1076,7 +1076,7 @@ public: m_completer(context()), m_autoshowcompl{context().options()["autoshowcompl"].get<bool>()}, m_disable_hooks{context().hooks_disabled(), context().hooks_disabled()}, - m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Transient ? + m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Draft ? Timer::Callback{} : [this](Timer&) { if (m_autoshowcompl) m_completer.update(); @@ -1096,7 +1096,7 @@ public: void on_enabled() override { - if (not (context().flags() & Context::Flags::Transient)) + if (not (context().flags() & Context::Flags::Draft)) m_idle_timer.set_next_date(Clock::now() + get_idle_timeout(context())); } @@ -1124,7 +1124,7 @@ public: { auto& buffer = context().buffer(); - const bool transient = context().flags() & Context::Flags::Transient; + const bool transient = context().flags() & Context::Flags::Draft; bool update_completions = true; bool moved = false; if (m_mouse_handler.handle_key(key, context())) |
