Avoid unnecessary copy of completion candidates

This commit is contained in:
Johannes Altmanninger 2022-12-21 15:23:17 +01:00
parent ed1e2f2e08
commit 70e96c272e

View File

@ -1126,7 +1126,7 @@ private:
items.push_back({ candidate, {} }); items.push_back({ candidate, {} });
const auto menu_style = (m_flags & PromptFlags::Search) ? MenuStyle::Search : MenuStyle::Prompt; const auto menu_style = (m_flags & PromptFlags::Search) ? MenuStyle::Search : MenuStyle::Prompt;
context().client().menu_show(items, {}, menu_style); context().client().menu_show(std::move(items), {}, menu_style);
const bool menu = (bool)(m_completions.flags & Completions::Flags::Menu); const bool menu = (bool)(m_completions.flags & Completions::Flags::Menu);
if (menu) if (menu)