Move input completer when constructing PromptCompleterAdapter

I think we usually do this when passing completers.
This commit is contained in:
Johannes Altmanninger 2022-07-21 16:25:15 +02:00
parent 559af669c7
commit 47329260da

View File

@ -306,7 +306,7 @@ private:
template<typename Completer>
struct PromptCompleterAdapter
{
PromptCompleterAdapter(Completer completer) : m_completer{completer} {}
PromptCompleterAdapter(Completer completer) : m_completer{std::move(completer)} {}
Completions operator()(const Context& context, CompletionFlags flags,
StringView prefix, ByteCount cursor_pos)