diff options
| author | Maxime Coste <mawww@kakoune.org> | 2025-03-22 15:51:05 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-03-22 15:54:05 +1100 |
| commit | eee362087dab83df7ddd7302f9182097642497a8 (patch) | |
| tree | c1f942305cb8516a1e64a0bbec1767345697a09d /src/input_handler.cc | |
| parent | e4858054449de932315225755b98f50554b79d6f (diff) | |
Improve info box clearing behaviour
Schedule clearing of the info box from normal mode even if mode
was disabled, clear on insert idle as well.
Fixes #5300
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index ea803217..5ec3615b 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -376,12 +376,10 @@ public: } context().hooks().run_hook(Hook::NormalKey, to_string(key), context()); + if (should_clear and not transient and context().has_client()) + context().client().schedule_clear(); if (enabled() and not transient) // The hook might have changed mode - { - if (should_clear and context().has_client()) - context().client().schedule_clear(); m_idle_timer.set_next_date(Clock::now() + get_idle_timeout(context())); - } } ModeInfo mode_info() const override @@ -1184,6 +1182,8 @@ public: m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Draft ? Timer::Callback{} : [this](Timer&) { RefPtr<InputMode> keep_alive{this}; // hook could trigger pop_mode() + if (context().has_client()) + context().client().clear_pending(); m_completer.update(m_auto_complete); context().hooks().run_hook(Hook::InsertIdle, "", context()); }}, |
