summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_manager.cc')
-rw-r--r--src/command_manager.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc
index c62d75fa..165a58f3 100644
--- a/src/command_manager.cc
+++ b/src/command_manager.cc
@@ -312,7 +312,7 @@ void CommandManager::execute(const String& command_line,
execute_single_command(params, context);
}
-Completions CommandManager::complete(const Context& context,
+Completions CommandManager::complete(const Context& context, CompletionFlags flags,
const String& command_line, ByteCount cursor_pos)
{
TokenPosList pos_info;
@@ -356,20 +356,21 @@ Completions CommandManager::complete(const Context& context,
return Completions();
ByteCount start = token_to_complete < tokens.size() ?
- pos_info[token_to_complete].first : cursor_pos;
+ pos_info[token_to_complete].first : cursor_pos;
Completions result(start , cursor_pos);
ByteCount cursor_pos_in_token = cursor_pos - start;
std::vector<String> params;
for (auto token_it = tokens.begin()+1; token_it != tokens.end(); ++token_it)
params.push_back(token_it->content());
- result.candidates = command_it->second.completer(context, params,
+ result.candidates = command_it->second.completer(context, flags, params,
token_to_complete - 1,
cursor_pos_in_token);
return result;
}
CandidateList PerArgumentCommandCompleter::operator()(const Context& context,
+ CompletionFlags flags,
CommandParameters params,
size_t token_to_complete,
ByteCount pos_in_token) const
@@ -382,7 +383,7 @@ CandidateList PerArgumentCommandCompleter::operator()(const Context& context,
const String& argument = token_to_complete < params.size() ?
params[token_to_complete] : String();
- return m_completers[token_to_complete](context, argument, pos_in_token);
+ return m_completers[token_to_complete](context, flags, argument, pos_in_token);
}
}