summaryrefslogtreecommitdiff
path: root/src/hook_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-12-23 13:54:09 +0000
committerMaxime Coste <frrrwww@gmail.com>2014-12-23 13:54:09 +0000
commitb6ff15aa757eb35fed5772d28e3c06b5e844a49e (patch)
treed41ebca1b4fe4591017f5310749b263047ba9345 /src/hook_manager.cc
parent064fb81b8d38df3bc77e2211fb6bc5db84fedb97 (diff)
Unify completion from container content logic
Diffstat (limited to 'src/hook_manager.cc')
-rw-r--r--src/hook_manager.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hook_manager.cc b/src/hook_manager.cc
index 70e1c8eb..2fe8bf5c 100644
--- a/src/hook_manager.cc
+++ b/src/hook_manager.cc
@@ -1,5 +1,6 @@
#include "hook_manager.hh"
+#include "containers.hh"
#include "context.hh"
#include "debug.hh"
#include "regex.hh"
@@ -26,8 +27,8 @@ CandidateList HookManager::complete_hook_group(StringView prefix, ByteCount pos_
CandidateList res;
for (auto& list : m_hook)
{
- auto candidates = list.second.complete_id(prefix, pos_in_token);
- for (auto& c : candidates)
+ auto container = transformed(list.second, id_map<HookFunc>::get_id);
+ for (auto& c : complete(prefix, pos_in_token, container))
{
if (!contains(res, c))
res.push_back(c);