From 47329260da20a87077764a7c7d7e9c91c0b61b2c Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Thu, 21 Jul 2022 16:25:15 +0200 Subject: [PATCH] Move input completer when constructing PromptCompleterAdapter I think we usually do this when passing completers. --- src/commands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index 5783b0b8..fc717814 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -306,7 +306,7 @@ private: template 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)