From 4d538fb423c072b7ed9d100c206164a89ba885a9 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 4 Dec 2016 13:37:33 +0000 Subject: [PATCH] Only hide menu/info if the insert completer did display it Avoid hiding info boxes opened by other places in the code. --- src/insert_completer.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/insert_completer.cc b/src/insert_completer.cc index e6e66c9a..43d512a6 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -418,13 +418,16 @@ void InsertCompleter::update() void InsertCompleter::reset() { - m_completions = InsertCompletion{}; m_explicit_completer = nullptr; - if (m_context.has_client()) + if (m_completions.is_valid()) { - m_context.client().menu_hide(); - m_context.client().info_hide(); - m_context.hooks().run_hook("InsertCompletionHide", "", m_context); + m_completions = InsertCompletion{}; + if (m_context.has_client()) + { + m_context.client().menu_hide(); + m_context.client().info_hide(); + m_context.hooks().run_hook("InsertCompletionHide", "", m_context); + } } }