Remove InsertCompletionSelect hook
This commit is contained in:
parent
9118a18d5d
commit
78419bc76f
|
@ -173,11 +173,6 @@ name. Hooks with no description will always use an empty string.
|
||||||
Triggered when the insert completion menu gets hidden, the inserted
|
Triggered when the insert completion menu gets hidden, the inserted
|
||||||
completion text is passed as filtering text.
|
completion text is passed as filtering text.
|
||||||
|
|
||||||
*InsertCompletionSelect* `selected completion`::
|
|
||||||
Triggered when an entry is selected in the insert completion
|
|
||||||
menu. The filtering text is the selected completion text or
|
|
||||||
the empty string if the original text was selected back
|
|
||||||
|
|
||||||
*RawKey* `key`::
|
*RawKey* `key`::
|
||||||
Triggered whenever a key is pressed by the user
|
Triggered whenever a key is pressed by the user
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ enum class Hook
|
||||||
InsertMove,
|
InsertMove,
|
||||||
InsertCompletionHide,
|
InsertCompletionHide,
|
||||||
InsertCompletionShow,
|
InsertCompletionShow,
|
||||||
InsertCompletionSelect,
|
|
||||||
KakBegin,
|
KakBegin,
|
||||||
KakEnd,
|
KakEnd,
|
||||||
FocusIn,
|
FocusIn,
|
||||||
|
@ -62,7 +61,7 @@ enum class Hook
|
||||||
|
|
||||||
constexpr auto enum_desc(Meta::Type<Hook>)
|
constexpr auto enum_desc(Meta::Type<Hook>)
|
||||||
{
|
{
|
||||||
return make_array<EnumDesc<Hook>, 41>({
|
return make_array<EnumDesc<Hook>, 40>({
|
||||||
{Hook::BufCreate, "BufCreate"},
|
{Hook::BufCreate, "BufCreate"},
|
||||||
{Hook::BufNewFile, "BufNewFile"},
|
{Hook::BufNewFile, "BufNewFile"},
|
||||||
{Hook::BufOpenFile, "BufOpenFile"},
|
{Hook::BufOpenFile, "BufOpenFile"},
|
||||||
|
@ -85,7 +84,6 @@ constexpr auto enum_desc(Meta::Type<Hook>)
|
||||||
{Hook::InsertMove, "InsertMove"},
|
{Hook::InsertMove, "InsertMove"},
|
||||||
{Hook::InsertCompletionHide, "InsertCompletionHide"},
|
{Hook::InsertCompletionHide, "InsertCompletionHide"},
|
||||||
{Hook::InsertCompletionShow, "InsertCompletionShow"},
|
{Hook::InsertCompletionShow, "InsertCompletionShow"},
|
||||||
{Hook::InsertCompletionSelect, "InsertCompletionSelect"},
|
|
||||||
{Hook::KakBegin, "KakBegin"},
|
{Hook::KakBegin, "KakBegin"},
|
||||||
{Hook::KakEnd, "KakEnd"},
|
{Hook::KakEnd, "KakEnd"},
|
||||||
{Hook::FocusIn, "FocusIn"},
|
{Hook::FocusIn, "FocusIn"},
|
||||||
|
|
|
@ -447,12 +447,6 @@ void InsertCompleter::select(int index, bool relative, Vector<Key>& keystrokes)
|
||||||
for (auto& c : candidate.completion)
|
for (auto& c : candidate.completion)
|
||||||
keystrokes.emplace_back(c);
|
keystrokes.emplace_back(c);
|
||||||
|
|
||||||
if (m_context.has_client())
|
|
||||||
{
|
|
||||||
const auto param = (m_current_candidate == m_completions.candidates.size() - 1) ?
|
|
||||||
StringView{} : candidate.completion;
|
|
||||||
m_context.hooks().run_hook(Hook::InsertCompletionSelect, param, m_context);
|
|
||||||
}
|
|
||||||
if (not candidate.on_select.empty())
|
if (not candidate.on_select.empty())
|
||||||
CommandManager::instance().execute(candidate.on_select, m_context);
|
CommandManager::instance().execute(candidate.on_select, m_context);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user