Only hide menu/info if the insert completer did display it

Avoid hiding info boxes opened by other places in the code.
This commit is contained in:
Maxime Coste 2016-12-04 13:37:33 +00:00
parent e2fae522e5
commit 4d538fb423

View File

@ -418,14 +418,17 @@ void InsertCompleter::update()
void InsertCompleter::reset() void InsertCompleter::reset()
{ {
m_completions = InsertCompletion{};
m_explicit_completer = nullptr; m_explicit_completer = nullptr;
if (m_completions.is_valid())
{
m_completions = InsertCompletion{};
if (m_context.has_client()) if (m_context.has_client())
{ {
m_context.client().menu_hide(); m_context.client().menu_hide();
m_context.client().info_hide(); m_context.client().info_hide();
m_context.hooks().run_hook("InsertCompletionHide", "", m_context); m_context.hooks().run_hook("InsertCompletionHide", "", m_context);
} }
}
} }
bool InsertCompleter::setup_ifn() bool InsertCompleter::setup_ifn()