mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-26 21:22:00 +03:00
Merge remote-tracking branch 'lenormf/fix-hook-once'
This commit is contained in:
commit
beb5d00992
@ -127,8 +127,11 @@ void HookManager::run_hook(StringView hook_name, StringView param, Context& cont
|
||||
if (to_run.hook->flags & HookFlags::Once)
|
||||
{
|
||||
auto it = find(hook_list->value, to_run.hook);
|
||||
m_hooks_trash.push_back(std::move(*it));
|
||||
hook_list->value.erase(it);
|
||||
if (it != hook_list->value.end())
|
||||
{
|
||||
m_hooks_trash.push_back(std::move(*it));
|
||||
hook_list->value.erase(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (runtime_error& err)
|
||||
|
Loading…
Reference in New Issue
Block a user