mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-28 06:08:05 +03:00
Pass selected completion text to InsertCompletionHide
This commit is contained in:
parent
0bff4851d9
commit
ace499ecb1
@ -169,8 +169,9 @@ name. Hooks with no description will always use an empty string.
|
||||
*InsertCompletionShow*::
|
||||
Triggered when the insert completion menu gets displayed
|
||||
|
||||
*InsertCompletionHide*::
|
||||
Triggered when the insert completion menu gets hidden
|
||||
*InsertCompletionHide* `completion`::
|
||||
Triggered when the insert completion menu gets hidden, the inserted
|
||||
completion text is passed as filtering text.
|
||||
|
||||
*InsertCompletionSelect* `selected completion`::
|
||||
Triggered when an entry is selected in the insert completion
|
||||
|
@ -473,13 +473,14 @@ void InsertCompleter::reset()
|
||||
{
|
||||
if (m_explicit_completer or m_completions.is_valid())
|
||||
{
|
||||
String selected_item = std::move(m_completions.candidates[m_current_candidate].completion);
|
||||
m_explicit_completer = nullptr;
|
||||
m_completions = InsertCompletion{};
|
||||
if (m_context.has_client())
|
||||
{
|
||||
m_context.client().menu_hide();
|
||||
m_context.client().info_hide();
|
||||
m_context.hooks().run_hook(Hook::InsertCompletionHide, "", m_context);
|
||||
m_context.hooks().run_hook(Hook::InsertCompletionHide, selected_item, m_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user