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,13 +418,16 @@ void InsertCompleter::update()
void InsertCompleter::reset() void InsertCompleter::reset()
{ {
m_completions = InsertCompletion{};
m_explicit_completer = nullptr; m_explicit_completer = nullptr;
if (m_context.has_client()) if (m_completions.is_valid())
{ {
m_context.client().menu_hide(); m_completions = InsertCompletion{};
m_context.client().info_hide(); if (m_context.has_client())
m_context.hooks().run_hook("InsertCompletionHide", "", m_context); {
m_context.client().menu_hide();
m_context.client().info_hide();
m_context.hooks().run_hook("InsertCompletionHide", "", m_context);
}
} }
} }