From eee362087dab83df7ddd7302f9182097642497a8 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 22 Mar 2025 15:51:05 +1100 Subject: 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 --- src/input_handler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/input_handler.cc') 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 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()); }}, -- cgit v1.2.3